Hi All
Some time ago I mailed some problems I had using proxy m:n collections in
combination with other proxy m:n collection objects; Setting one seemed to
clear the other (which is clearly not what we want). I traced the problem
back to what I think is a bug in PersistenceBrokerImpl.java; what happens is
that every time an object is stored and the reference collections are stored
as well, the entries in the indirection table are deleted and later added
again, _except_ when the collection is proxy and not loaded yet. Which means
the loss of reference collections. I switched the two checks which solves
the bug for me; below is the code I switched around.
// MBAIRD
// if the collection is a collectionproxy and it's not already loaded
// no need to store it.
if (col instanceof CollectionProxy && !((CollectionProxy)col).isLoaded())
{
continue;
}
if (cds.isMtoNRelation())
{
/* LEANDRO
* Clear all MtoN implementors.
* All new MtoN implementors are going to be added bellow
*/
//logger.info("STORE COLLECTIONS: deleting all MtoN implementors
for field "+cds.getPersistentField().getName());
deleteMtoNImplementor(cds, obj);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>