|
Hello, I've problem with ObjectModifiedException: Transaction aborted: Object of type xxx.yyyy with identity zzz has been modified by a concurrent .... I'm not able to find problem with incorrect transaction handling in my code. As I've read in [castor-dev] Dancing with concurrency http://hypermail.linklord.com/castor-dev.old/2002/Aug/0696.html > Yes, in fact, Castor officially requires bi-directional
I've 4 questions: 1. Could using of uni-directional object relationships lead to: ObjectModifiedException: Transaction aborted: Object of type xxx.yyyy with identity zzz has been modified by a concurrent transaction (cache entry is different from database row). 2. Except this case I've no problem while using uni-directional relationships in whole project . Should I use bi-directional relationships for all master-detail (parent-child) object couples ? 3. Where or on which situations and how is bi-directional relationship rigorously enforced ? 4. A very stupid question - " ... if an Order object contains a reference to a LineItem object, the LineItem object must contain a reference to the Order object ..." does reference mean that class/object Order must have object property of class LineItem with get and set methodes ... and vice versa ... + same changes in the mapping file.
Thanks, Richard
BTW: Temporarily I've solved this problem by refreshing object cache via db.DbLocked load: db.begin(); objYYYY = (yyyy) db.load(yyyy.class, objYYYY.getID(), db.DbLocked) db.commit();
|
- Re: [castor-dev] ObjectModifiedException problem ... Dancin... Richard Grill
- Re: [castor-dev] ObjectModifiedException problem ... D... Sandeep Bhasin
- Re: [castor-dev] ObjectModifiedException problem .... Richard Grill
