|Re: Problem with indirect (lazy) mappings [message #510734 is a reply to message #510706]
||Thu, 28 January 2010 13:56
| Chris Delahunt
Registered: July 2009
The JPA specification requires that collection attributes be either a Collection, Set, List or Map type, allowing providers to put in their own implementions transparently for lazy relations. EclipseLink does not strictly enforce this, which is why your collection type being ArrayList will work as long as it is not lazy. In order to be portable, you will need to change the toB type to be List, allowing EclipseLink to put its own IndirectList type when populating managed entities and still allowing your model to use ArrayList.
If you do not want to use the java.util.List and prefer a concrete type be specified, you would need to mark it as Transient and then use a customizer to create the mapping with native EclipseLink api.
Powered by FUDForum
. Page generated in 0.01568 seconds