|IndirectList inserted as parent [message #792455]
||Tue, 07 February 2012 02:21
| Geoff Capper
Registered: January 2012
I'm using EclipseLink on Glassfish 3.1.1|
I have an entity relationship in a "DefaultCategory" class, which defines a List, "children" of DefaultCategory, and each has a property, "parent", which is DefaultCategory.
After getting serialisation problems involving ClassCastExceptions on the parent field I logged the structure of my object tree and for some reason the parent property at the top level of these objects, which should be null, is set to "org.eclipse.persistence.indirection.IndirectList" which understandably throws the ClassCastException when sent across the wire.
Can anyone shed any light on this and how I might resolve it? Why is a ClassCastException not thrown in the first place, when these objects are pulled from the DB? Am I doing something wrong somewhere to have this happen?
Powered by FUDForum
. Page generated in 0.03226 seconds