oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

Mail List maillist@hi-privacy.net
Mon, 14 May 2001 09:14:55 -0500


From: "Joachim Werner" <joe@iuveno-net.de>

> > This is true in the ZODB, but can be complicated by acquisition. If an
> > object can acquire itself, it can cause issues. Plus it becomes
> > difficult to know whether objects are clones or just identical
> > instances, although this can be mitigated by exposing their Python
> > instance id.
>
> Acquisition is very cool, but it sometimes really sucks ... AFAIK you can
> easily "switch it off" in your own Python products. But I am still
fighting
> with only getting private variables (i.e. not acquired ones) in DTML ...
>
>From DTML I have used 2 different methods for this:
1) <dtml-with expr="object" only>
 .....
</dtml-with>

or
2) <dtml-if expr="_.hostattr(object.aq_explicit('attribute')">
   .......
</dtml-if>

In both cases 'object' is the thing with the 'private variables' and in 2),
'attribute' is the 'variable' name.
Jeff