[Zope] Undo machinery and OOBtrees
Dieter Maurer
dieter at handshake.de
Sun Jan 11 13:20:46 EST 2004
Alec Mitchell wrote at 2004-1-10 20:47 -0800:
> ...
>Is there any way to get the
>transaction associated with the proper object? I tried the method listed in
>a recent zopelabs.com recipe:
>
>get_transaction().note('/'.join(foo.getPhysicalPath()))
The "Undo" machinery uses the first information in "Transaction.description".
"Transaction.note" appends to this field. This means, it is unable
to change information already there (as it the case for the object).
You can make an external method that changes "description" directly
or call "get_transaction().commit()" (this commits the old transaction
and opens a new one) and then call "get_transaction().notr(...)".
Note that it may be dangerous to have two commits in one request
(in case the request is repeated due to "ConflictError"s).
--
Dieter
More information about the Zope
mailing list