0

I have same question which was answered in hibernate 3 here. However, I can't apply this to hibernate 4 as there is no @CollectionOfElements annotation. Can someone provide the solution that can be executed using hibernate 4?

EDIT: changed @CollectionOfElements to @ElementCollection worked for me. What should I do with @JoinTable now, because there is no table field in there.

Community
  • 1
  • 1
Akadisoft
  • 306
  • 1
  • 2
  • 13

1 Answers1

1

Hibernate 4 only supports the standard JPA annotation, which is @ElementCollection.

Note that even Hibernate 3 recommends using this standard annotation:

Deprecated. use @ElementCollection

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255