[prev in list] [next in list] [prev in thread] [next in thread]
List: zope3-users
Subject: Re: [Zope3-Users] Non-owning references in Zope3
From: Gary Poster <gary () zope ! com>
Date: 2006-05-24 20:33:30
Message-ID: 7F952CE3-073C-4170-AAFB-D824C3969CCE () zope ! com
[Download RAW message or body]
On May 24, 2006, at 4:27 PM, Alek Kowalczyk wrote:
> Tom Dossis wrote:
>> thealx@poczta.onet.pl 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
and
B.bar = A
will work as you expect. Haven't seen clear requirements for this
from you, but maybe I missed them.
Gary
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic