[Zope-CMF] Re: [Zope] Persistent dictionaries
Thomas Olsen
tol@tanghus.dk
Fri, 24 Aug 2001 08:44:11 +0200
Yihaw - it seems to work between restarts. Actually I had read about it; I
just assumed that PersistenMapping did this for me. Should have read the
source more closely.
Thanks!
On Friday 24 August 2001 07:08, Michael R. Bernstein wrote:
> > It works great - until the object gets unloaded from the memory :-(
> >
> > What am I doing wrong?
>
> Unless I miss my guess, this is because Zope doesn't persist changes to
> mutable subobjects automatically. Dictionaries (like lists) are mutable
> types, so you need to inform the persistence machinery that something
> has changed:
>
> self.__changed__(1)
>
> Immutable properties, such as strings or tuples, don't have this
> requirement.
--
Regards,
Thomas Olsen
http://www.tanghus.dk