[ZODB-Dev] Persistent sub-objects: noob question

Paul Winkler pw_lists at slinkp.com
Sat Jan 24 18:23:34 EST 2004


On Sat, Jan 24, 2004 at 07:58:37PM +0200, Steve Alexander wrote:
(snip)
> The reason to set _p_changed before mutating the object is because if 
> there is an exception raised after a mutation but before setting 
> _p_changed, your persistnent object might stay around in the cache. That 
> is, it would not be reloaded with fresh state.

Thanks for the tip. I just added it to the "Gotchas" page 
of the ZDG:
http://zope.org/Documentation/Books/ZDG/current/Gotchas

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SARGENT GOOGA BALONEY!
(random hero from isometric.spaceninja.com)



More information about the ZODB-Dev mailing list