1

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.

GingerHead
  • 8,130
  • 15
  • 59
  • 93

1 Answers1

3

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;
Mikko Maunu
  • 41,366
  • 10
  • 132
  • 135