You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Rainer Klute <kl...@rainer-klute.de> on 2004/02/20 12:06:15 UTC

ODMG: Object modifications outside transactions

>From the ODMG tutorial and the API doc I had the impression that a persistant object has to be modified inside a transaction in order to become effective in the database.

My application begins a transaction, retrieves a persistant object from the database using an OQLQuery and closes the transaction. Then it modifies one of the object's attributes outside any transaction. After that the reference variable pointing to the object is to null to make sure that no more modifications are done, especially not inside a transaction.

What I expected was that the modification was not persisted, i.e. when retrieving the object again from the database in a new transaction using the same OQLQuery as above, it should be the original, unmodified version. However, this is not the case: the modification is visible.

Is this a bug in OJB's ODMG implementation or a misunderstanding on my side?

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org