[Zope-dev] PROPOSAL: ZODB Relationships

Lennart Regebro lennart@regebro.nu
Fri, 09 May 2003 10:32:40 +0200


roche@upfrontsystems.co.za wrote:
>     http://www.zope.org/Members/upfront/ZODBRelationships

Very interesting. What I miss is a way to name the relationship so you 
can specify which relationship you are interested in. That just fuzzily 
specify that object A has some sort of relationship to object B doesn't 
seem very useful...

The typical use of a relationship storage is to ask the relationship 
repository for all students for a course. But if the relationship is 
only stored as 'there is a relationship', then all teachers would pop up 
to. The RelationshipViews partially solve this, but require you to load 
the objects, and therefore you might still need to traverse the ZODB to 
find all the objects you are gonna query.

I have missed this type of functionality, but I always saw it as an 
extention to the Catalog, so that you could query not only on indexesd 
metadata, but also on relationships to other objects. It would of course 
be possible to add functionality to the Catalog to query this even if 
the relationships are not stored in the Catalog itself. In any case, the 
relationship would need an id so you can specify which relationship you 
want to query.