This one time, at band camp, Davis, Richard said:

DR>I'm encountering a problem with short transaction updates when I attempt
DR>commit a changed object. 
DR>
DR>The object has a property which is another Castor data object which itself
DR>has a collection of Castor data objects. The relationship is 1 to 1 to many
DR>in this case.  
DR>
DR>The problem is that changes to the 1-many collection are not picked up and
DR>persisted when the top-most object is updated in a short transaction.
DR>
DR>Long transactions work fine for this but short transactions don't to work.
DR>
DR>The code looks like this.
DR>
DR>---
DR>db.begin()
DR>
DR>ApplicationObjectData persistedData = (ApplicationObjectData)
DR>db.load(objectType,  identity);
DR>
DR>// change persistedData so that the property that contains the collection is
DR>different - in my case, has less contained items in the 1-many collection.
DR>
DR>db.commit()
DR>----
DR>
DR>Any ideas why changes to this inner contained collection of objects are not
DR>persisted in short transactions but work fine in long transactions?

Rich,

Try using db.setAutoStore( true ). This will persist all reachable
objects in a graph.

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to