Hi.

I'm having several problems, and I don't know if its because of my misunderstanding of the ODMG Api or maybe a bug in the implementation.

I create a new object in a transaction, modify it and then delete it (all in the same transaction):

...
tx.begin();
A a = new A();
a.setId(1);
db.makePersistent(a);
a.setName('Object a');
db.deletePersistent(a);
tx.commit();
...

I know it's a dummy example, but I need to do something similar in the same transaction. My application works with a complex hierachy of objects and in a transaction it could be posible to add one but later discard this addition.

I suposed the persistence would do nothing since the final state of the object is deleted, but somehow the transaction notices the object has been modified (although the last operation was to delete it) and inserts into the database. It worked well in 0.9.7 but now it seems that the changes made to TransactionImpl (I guess in the register() method) make it fail.

I would like to know what is the correct way of doing that if I'm wrong.

Thank you in advance.

Jose Maria



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to