[Zope] beginner's question: references

Shalabh Chaturvedi shalabh@pspl.co.in
Mon, 6 Mar 2000 21:09:35 +0530


Evan Simpson wrote:
> ----- Original Message -----
> From: Perrin Harkins <perrin@primenet.com>
> > This is such a stupid question, but I can't seem to figure it out from
> > the docs.  How do I make an object in Zope reference another object?
>
> Not a stupid question, and not simple, either.  There are two ways to do it,
> and choosing one over the other can be difficult.
>
>             [first way snipped]
>
> 2.  Store the object as an attribute of the referencing object.  This has to
> be done (I think) from an External Method, since you *aren't* setting a
> property.  You do something like "self.fooref = self.path.to.other.aq_base"
> which DTML doesn't allow.

(AFAIK, the ObjectManager (base for folder) uses this mechanism too.)

Was just wondering, why the 'aq_base' part is required ? What could go wrong if
I just had self.path.to.other ?

Thanks,
Shalabh