[Zope-dev] Quick Persistence Question
Chris Withers
chrisw@nipltd.com
Mon, 21 May 2001 16:39:31 +0100
Casey Duncan wrote:
>
> Chris Withers wrote:
> >
> > if self.data is a BTree and I do:
> >
> > obj = self.data[id]
> > obj.revsub = obj.revsub + 1
>
> AFAIK _p_changed is only needed when you change a mutable attribute you
> want stored like adding a dict key or appending to a list. revsub looks
> like an int which is not mutable. The persistance machinery should pick
> up on this change automagically.
Thanks,
I had thought that maybe changing obj (which is stored in a dictionary-like
thing) might have an effect that needed self._p_changed, but I found stupid
programmer error was actually the cause
*grinz*
Chris