[Zope] Pointer-to-Object Properties (Was: Altering productinstance changes all instances!)

Michael Bernstein mbernstein@profitscape.net
Mon, 01 Nov 1999 17:05:30 -0800


Pavlos Christoforou wrote:

> On Mon, 1 Nov 1999, Michael Bernstein wrote:
>
> > were sub objects, thus enabling one-to-many, many-to-one, and many-to-many
> > relationships not constrained by the object heirarchy.
>
> Yes! That would be very useful and I remember that this issue came up more
> than once on the list. A few questions though ...
>
> What happens if you delete an object that is pointed to? Should the links
> be deleted too? If yes should they be deleted automatically or in a semi
> automatic way, similar to pack.

I have no strong opinions on this subject so I'll leave it open for
discussion...

> If a link to an object is called is it rendered in the context of the
> calling method?

No. The whole point of the link/pointer property is merely to act as a local
'alias' to the actual object. Properties and methods should be called and/or
rendered within the objects actual context.

> How do you deal with circular references? (ZODB has no problem with that
> but what if you have:
> <snippage>

Acquisition should be completely circumvented, except WRT the objects absolute
pointed-to location in the heirarchy (you could, I suppose, point to the object
in a different context...)

HTH,

Michael Bernstein.