[ZODB-Dev] know the state of an object

Dieter Maurer dieter at handshake.de
Wed Oct 19 15:53:35 EDT 2005


Victor Safronovich wrote at 2005-10-18 13:18 +0600:
> ...
>   May be usefull to add some simple workflow to Persistent class with
>   states:
>       GHOST
>       UPTODATE
>       CHANGED
>       STICKY
>   transitions:

Most of the transitions are there (though through strange names)
>       activate

--> obj._p_changed = 0

>       deactivate

--> obj._p_deactivate() # works unless CHANGED

>       ghostify

this is the same as deactivate

>       unghostify

this is the same as activate

>       changed

--> obj._p_changed = 1

>       invalidate

I think, this is not easily available, but
"obj._p_changed = None" might work

-- 
Dieter


More information about the ZODB-Dev mailing list