[Zope-dev] Nested Transactions

Robert Leftwich robert@leftfieldcorp.com
Mon, 02 Aug 1999 11:50:54 +1000


I have a situation where an operation can be performed that may require
multiple interactions with the user depending on the information that is
available. Currently each interaction results in a single transaction,
but I would like the entire process to be rolled up into one
transaction, enabling rollback and undo to work correctly and not leave
the database in an invalid state. 
According to the documentation, calling begin on the Transaction object
will result in the active transaction being aborted. What I need is
nested transactions, where calling begin only increments an internal
count and subsequent commits decrement the count until 0 when the
transaction is actually committed (i.e. as for most SQL databases).
Sub-transactions do not help as their behaviour is the same as what
occurs now.
Is there a way to do this currently ? (Note that ideally this would work
in both 1.10.3 and 2.0 until a stable 2.0 is released.)

TIA
Robert Leftwich