[ZODB-Dev] Excellent overview of ODBMS and my take on ZODB

Geert-Jan Van Den Bogaerde gvdbogae@vub.ac.be
Tue, 26 Feb 2002 14:00:08 +0100 (MET)


On Tue, 26 Feb 2002, Patrick K. O'Brien wrote:

> Okay. Well, I got that "rule" out of Jim Fulton's paper:
> 
> "A persistent object must not implement __getattr__ or __setattr__ .
> These special methods are already implemented by the persistence system.
> Overriding them correctly, while possible, is extremely difficult."
> 
> At this point I'm talking about the current StandaloneZODB that is
> available, not the ZODB in the Zope3 branch of CVS. So for StandaloneZODB
> 1.0, does this rule apply or not?
> 

According to A.M. Kuchling's ZODB programmer's guide:
(http://www.amk.ca/zodb/guide/node19.html)

"Recent versions of ZODB allow writing persistent classes that have
__getattr__, __delattr__, or __setattr__ methods. The one minor
complication is that the machinery for automatically detecting changes to
the object is disabled while the __getattr__, __delattr__, or __setattr__
method is executing. This means that if the object is modified, the object
should be marked as dirty by setting the object's _p_changed method to
true."

Recent versions here I'm pretty sure refers to to the latest releases of
the StandAloneZODB/ZODB3 branch, not the ZODB branch in Zope3. 

So it is possible in StandaloneZODB 1.0, but you need to set _p_changed
manually.

> ---
> Patrick K. O'Brien
> Orbtech
> 
> > -----Original Message-----
> > From: zodb-dev-admin@zope.org [mailto:zodb-dev-admin@zope.org]On Behalf
> > Of Chris Withers
> > Sent: Tuesday, February 26, 2002 4:18 AM
> > To: pobrien@orbtech.com
> > Cc: Pythoncard; ZODB
> > Subject: Re: [ZODB-Dev] Excellent overview of ODBMS and my take on ZODB
> >
> >
> > "Patrick K. O'Brien" wrote:
> > >
> > > Persistent base class, and you cannot use __getattr__ or __setattr__
> > > methods.
> >
> > Not true.
> 
> [snip]
> 
> cheers,
> 
> Chris
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
> 
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
> 


------------------------------------------------------------------
Student, Computer Science Faculty, Vrije Universiteit Brussel
e-mail: gvdbogae@vub.ac.be | homepage: http://www.codefusion.net
------------------------------------------------------------------