[Opensource] Potential problem in changelog behaviour
Raul DAVIDOVICH
R.DAVIDOVICH at caconcology.com
Fri Feb 20 03:27:21 PST 2004
Hello,
I'm using change logging provided by expresso's DBObjects, and I found a
potential issue.
in the add() method, the DBObject addis made before the change log entry. I
believe this is to simplify it since one does not have the auto inremented
values until the object is added.
the problem is that if for whatever reason the change log entry adding
fails, you'll have an entry in the target table without the corrsponding
changelog entry.
to correct this, I first add the changelog entry, then add the dbobject,
and then update the changelog entry with the key.. It's not perfect since
I'm still doing something on the changelog after the object is added, and
ideally change logs should'nt be modifiable.
So my question is; is there a way to get the autoincrement values before
actually performing the add() so a clean changelog entry could be recorded
* before * the actual data entry?
thanks in advance
Regards,
---------------------------------------------------
Raul Davidovich
Responsable Informatique
Cvitkovic & Associés Consultants
(33) 1 45 15 40 68
(33) 1 45 15 40 41 Fax
-------------------------------------------------------
http://www.caconcology.com
More information about the Opensource
mailing list