|Re: @OneToMany SortedSet [message #748405 is a reply to message #741657]
||Mon, 24 October 2011 17:23
| James Sutherland
Registered: July 2009
Location: Ottawa, Canada
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 : Wiki : Book : Blog : Twitter
Powered by FUDForum
. Page generated in 0.01960 seconds