This one time, at band camp, Neil Aggarwal said: NA>Hello: NA> NA>I am trying to figure out something: NA> NA>Does the timestamp need to be placed in the database for objects NA>involved in long transactions? NA> NA>I wrote some test code that attempts to use a long transaction: NA> // Get the database NA> Database db = jdo.getDatabase(); NA> // Start a transaction NA> db.begin(); NA> // Allocate a parameters objects NA> persistent.Parameters parameters = new persistent.Parameters(); NA> db.create(parameters); NA> db.commit(); NA> NA> // Update the parameters object NA> Database db = jdo.getDatabase(); NA> db.begin(); NA> parameters.setChargePPV(true); NA> db.update(parameters); NA> db.commit(); NA> db.close(); NA>This code always throws a ModifiedException. NA> NA>Here is my mapping file: NA> <class name="persistent.Parameters" NA> identity="id" NA> access="shared" NA> key-generator="MAX" NA> auto-complete="false"> NA> <map-to table="Parameters" /> NA> <cache-type type="count-limited" /> NA> NA> <field name="chargePPV" NA> type="boolean" NA> get-method="getChargePPV" NA> set-method="setChargePPV"> NA> <sql name="chargePPV" NA> type="bit" /> NA> </field> NA> NA> <field name="id" NA> type="integer" NA> get-method="getId" NA> set-method="setId"> NA> <sql name="id" NA> type="integer" /> NA> </field> NA> NA> </class> NA>
Neil, There is no need for you to worry about the timestamp with regard to long transactions. Simply implement the TimeStampable interface (http://www.castor.org/javadoc/org/exolab/castor/jdo/TimeStampable.html) in the objects invovled in the long transaction. See the following for more information: http://www.castor.org/long-transact.html 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
