|Re: @OneToMany SortedSet [message #748406 is a reply to message #741659]
||Mon, 24 October 2011 17:23
Registered: July 2009
Is this a compile error, or just a warning from Eclipse's JPA support?|
If you just ignore the warning, does it work?
You can give the targetEntity in the annotation and probably make the warning go away.
JPA only allows Collection, List and Set for collection types, but EclipseLink will support any implementation is you use EAGER. For LAZY support, one of the three interfaces is currently required. You could use Set, and assign a TreeSet to it, however EclipseLink would use its LAZY Set, IndirectSet when restoring from the database.
@OneToMany(targetEntity=A.class, fetch=EAGER, mappedBy="b")
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
Powered by FUDForum
. Page generated in 0.14093 seconds