|
-----Original Message----- What do you mean same properties? Does they
have same identity? What do you mean twice? Do you mean one for
each new object? Or, you mean twice for each new object? I still doubt you’re updating with the
same instance base on your description, even you confirmed me. Anyway, if it is the same instance, then
you can simply add the following code in your program: if ( !db.isPersistence( objectTobeUpdate ) { db.update( objectToBeUpdate
); } If they are the same instance, the above
should solve your problem. Castor always takes the snap shot of the
object state at the commit time. When is the object being updated do not
matter.
The throw clause is very necessary and
is there for a purpose. Thomas
|
Title: Issue with 2 updates on a record in the same transaction...
