Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Entity serialization on bidirectional relationships

I am seeing some odd behavior with deserialization of bidirectional relationships. I have the following object map:
A->B->C
where '->' is a one to many mapping which is bidirectional. I have no weaving, so the OneToMany is an IndirectList and the ManyToOne is not.
VM1:
- I fetch all A's with a query
- I get the size() of the B collection so that is gets instantiated
- serialize A's
VM2:
- deserialize A's
- getting A->B->A->B throws a ValidationException about traversing a relationship using indirection

To clarify (sort of), after deserialization, I can get B from A, but if I get A from B afterwards, B is then an IndirectList.

If I set the OneToMany eager, this problem does not present itself.

If this is not understandable, I can post my test case.

Thanks,
Mike





Back to the top