|
PS: How do you deal with proxy's?
A proxy is just a "wrapper around the id" (which was a foreign key in the referencing object). Say I have A -> B -> C -> D (all explicitly LAZY mapped) and I select A left join fetch B, but I don't eager fetch C. Is this really a duplicate of http://jira.codehaus.org/browse/XSTR-226?
It seems like the former is dealing with the hibenrate collection classes. This bug seems to be related to the fact that proxied objects in hibernate also use CGLIB and add their own callbacks. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
AFAIK the PersistentBag implements remembers what objects have been deleted.
So when you cascade to a bag(=List), it's probably a performance gain (and even optimistic locking check too?) to come back with the modified detached PersistentBag's instead of a brand new ArrayList.
Nevertheless, sanitizing will probably work.