[ZODB-Dev] Adopting ZODB

Christian Theune ct at gocept.com
Fri Jul 14 02:37:26 EDT 2006


Dieter Maurer wrote:
> Christian Theune wrote at 2006-7-13 17:13 +0200:
>> ...
>>> Is there any ability in ZODB to retroactively wrap objects in a
>>> persistence mechanism instead of having to rewrite an entire library
>>> to use the Persistent class?
>> You can always persist (almost) any object, even if it does not subclass 
>>from Persistent. However, any changes to the object will not be detected 
>> automatically and you would have to either a) reassign the object to the 
>> ZODB or b) mark it as changed using _p_changed()
> 
> The "it" above may be misleading:
> 
>   It is very unlikely that a non-persistent object has a "_p_changed"
>   method.
> 
>   The "it" above therefore cannot refer to the 'object not derived
>   from "Persistent"'.
> 
>   Usually, "it" refers to the persistent parent containing the
>   non persistent object as attribute value.

Yes. Actually I even meant the wrong "it". I tried to clarify in a later 
posting ... sorry for the confusion.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development



More information about the ZODB-Dev mailing list