db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Hilka" <thi...@vps.de>
Subject Problems with rollback
Date Tue, 10 Oct 2006 14:14:28 GMT
Hello everyone,

We have some problems rolling back transactions. 
Torque has the two flags "new" and "modified" to hold the state of the
instance of the T-class (subclass of BaseObject). These two flags are reset
upon saving the record. Our problem is: If something goes wrong later on in
the same transaction, we want to roll back all changes that were performed.
So we want these two flags to be the same as before the save as well. But it
seems that Torque does not touch these two flags upon rollback. If we try to
save the same object again (after fixing the reason for rollback), these two
flags are not set and therefore the object (which is not yet stored in db)
is not stored in database.

Is there any elegant solution for this problem? We were thinking of holding
the state of all involved T-objects in some state object and restore the
state upon rollback.

Mime
View raw message