Author Login
Post Reply
Sorry that I can't give you any definitive answer. @ElementCollection is a JPA 2.0 element which creates a collection of embedded entities. The @PersistenceCollection element is older and may be more general.
My general guideline is to prefer the standard annotations over package specific ones. If you are working with JPA 2.0 and are specifically using collections of embedded entities, consider using @ElementCollection. Otherwise, do what you've always done.
On Mar 15, 2010, at 11:42 AM, Jean-Baptiste BRIAUD -- Novlog [via OpenJPA] wrote:
> Hi
>
> What are the differences between @ElementCollection and @PersistentCollection ?
> I'm already using @PersistentCollection but I encountred @ElementCollection in the examples folder of OpenJPA 2.0.0 beta 2 in a embedded folder.
>
> At the end, I'm not sure to see a difference ... so I'm puzzled.
>
>
>
> View message @ http://n2.nabble.com/ElementCollection-and-PersistentCollection-tp4737753p4737753.html
> To start a new topic under OpenJPA Users, email ml-node+208411-1595610943-93721@(protected)
> To unsubscribe from OpenJPA Users, click here.
>
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.