I've got a report with a log which includes
===
25.2 11:00:21: about to perform 2 DB operations in er.extensions.eof.ERXEC@63be527e...
- 1: INSERT on 'DBUserAuction' 4{creationDate:2015-02-25 10:00:19 Etc/GMT, user_id:1000042, auction_id:1000260, favourited:false}
- 2: UPDATE on 'DBAuction' ((uid = 1000260) and (commodityPriceSelectionType = 1040355)) 1{commodityTimechunksString:<com.webobjects.foundation.NSKeyValueCoding$Null>}
cannot save changes: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext, object: <DBAuction@820157825 PK:1000260 E:1 Title:'Dodávka elekt?iny v nap??ové hladin? nízkého nap?tí' /EC:749e8ece>,
databaseContext: com.webobjects.eoaccess.EODatabaseContext@43afebc9, object's editingContext: er.extensions.eof.ERXEC@749e8ece, databaseContext's active editingContext: er.extensions.eof.ERXEC@63be527e
at cz.ocs.Static.PRINT_ERROR(Static.groovy:15)
at cz.ocs.model.OCSEnterpriseObject.saveChangesWithEC(OCSEnterpriseObject.groovy:812)
at cz.ocs.model.OCSEnterpriseObject.saveChangesWithEC(OCSEnterpriseObject.groovy)
at cz.ocs.model.OCSEnterpriseObject$saveChangesWithEC$7.call(Unknown Source)
at app.Session.saveChanges(Session.groovy:210)
...
===
Now, at the surface, it makes perfect sense -- my own logs concur that EC 63be527e was saving and that the DBAuction object belonged to EC 749e8ece, EOF has full right to scream.
I wonder though -- how the H might it happen that an object of another EC gets into this one's update list?!? That's the main reason I write: is there a well-known condition which would lead to this? Note that no objects were added to any relationships;
simply, one has been inserted, another updated[*].