[Zope-dev] RFC: RelationAware class for relations between obj ects

Shane Hathaway shane@zope.com
Thu, 08 May 2003 15:41:14 -0400


sean.upton@uniontrib.com wrote:
> So the answer of what acts as a reference id for the referred-to object is:
> "Whatever the best id that your framework provides you is."
> 
> If your framework is Zope3, a hubid is what you should use.  In Zope2, a
> path or tuple containing (storagename, oid).  In ZODB-sans-Zope, an oid (or
> a (storagename, oid) tuple with the storagename an empty string).
> 
> I wonder if a single framework could adapt to fit the needs of all 3?  It
> seems doable (different plugins to store the IDs, 'traverse' to the
> objects), I think...

Yes, it would be elegant and I don't think it would be complicated at 
all.  For Zope 2, I think you'd either use a path or a hub ID (assuming 
the object hub gets backported. ;-) )

Shane