Bookmark Topic Watch Topic
  • New Topic


Krishan Chauhan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,

I am using hibernate as persistence provider for EJB. So generally I use annotations defined in JPA spec i.e OnetoMany , ManyToMany etc. I have seen in some places people using CollectionOfElements.

can somebody tell me the use of @org.hibernate.annotations.CollectionOfElements?
I am having trouble understanding how it works?

I checked the documentation which simply says Annotation used to mark a collection as a collection of elements or a collection of embedded objects.

under what scenario will we use this annotation?

is this similar to @OneToMany , @ManyToMany annotations?

Where will one go for it instead of OneToMany? Do we need any other meta-data also for CollectionOfElements?

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!