Reputation: 11
I seem to have problems with mapping a List in Hibernate. In our project there is a class Profile
, it contains a List<String>
.
Is List<String>
mappable by Hibernate using annotations, using Java Persistence 1.0 (NO ElementCollection
!)? (annotations like @Entity
)
I know that Java Persistence 2.0 consists of ElementCollection
, but in our project we have only Java Persistence 1.0.
Upvotes: 1
Views: 354
Reputation: 42084
There is nothing like that in JPA 1. You have to fallback to Hibernate specific annotation and use CollectionOfElements instead:
@org.hibernate.annotations.CollectionOfElements
List<String> myElements;
Upvotes: 3