[ZODB-Dev] transaction observer iface

Dieter Maurer dieter at handshake.de
Sun Feb 22 13:33:48 EST 2004


hazmat at objectrealms.net wrote at 2004-2-21 07:20 -0600:
> ...
>> As Shane already pointed out: transactions already support notification
>> for most of the events listed (not for begin, not for "objectRegistered").
>
>as noted in my other email, the timing of those events for data managers
>is such that its not safe/determinstic for modifying application data.

Agreed.

In fact, I, too, have had a use case:

   An object relational mapper that should put modified
   attributes into the relational table in a single
   SQL update on commit.

   The initial implementation had a bug because the DA
   was registered too late.

   I worked around the problem by registering the DA explicitly.
   But the "beforeCommit" observer would be clearer.

-- 
Dieter



More information about the ZODB-Dev mailing list