On May 24, 2006, at 4:27 PM, Alek Kowalczyk wrote:

Tom Dossis wrote:
Hi, I am relatively new to Zope3. I could not find anywhere an example, what is the 'right way' to make non-owning reference to another object in Zope? Every piece of zope3 docs is full of examples of containers, this makes a good tree like structure. But how to refer from one object to another in right way? Can/ should I do that with Object field?
One offering is zc.extrinsicreference ... http://svn.zope.org/ zc.extrinsicreference/trunk/src/zc/extrinsicreference/ extrinsicreference.txt I'm not aware of any zope.schema / FieldProperty stuff to do this; it would be pretty useful though.
Thanks! I have also found a references library in 'schooltool' project. It seems to be similar to RDF and adapts any Annotatable object. But I'm looking for something more straightforward - both approaches (extrinct and schooltool) seem to be too complex and not pythonic...

It sounds like you just want to make python references?  That works.

given A and B, two objects whose classes inherit from persistent.Persistent,

A.foo = B


B.bar = A

will work as you expect. Haven't seen clear requirements for this from you, but maybe I missed them.

Zope3-users mailing list

Reply via email to