From c04f84ed8f982f1e4dab03940a7f1cd3ef90136d Mon Sep 17 00:00:00 2001 From: helmutm Date: Thu, 3 Nov 2005 10:48:53 +0000 Subject: [PATCH] RelationsRegistry is now using the correct FieldIndex adapting relation objects to IIndexableRelation git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@655 fd906abe-77d9-0310-91a1-e0d9ade77398 --- relation/README.txt | 9 ++++++ relation/configure.zcml | 6 ++++ relation/registry.py | 68 ++++++++++++++++++++++++++--------------- 3 files changed, 59 insertions(+), 24 deletions(-) diff --git a/relation/README.txt b/relation/README.txt index 48eef97..69cd508 100644 --- a/relation/README.txt +++ b/relation/README.txt @@ -115,6 +115,15 @@ an utility (using a stub/dummy implementation for testing purposes): >>> from zope.app.testing import ztapi >>> ztapi.provideUtility(IIntIds, IntIdsStub()) +We also have to provide an adapter for the Relation objects that provides +the attributes needed for indexing: + + >>> from cybertools.relation.registry import IIndexableRelation + >>> from cybertools.relation.registry import IndexableRelationAdapter + >>> from cybertools.relation.interfaces import IRelation + >>> ztapi.provideAdapter(IRelation, IIndexableRelation, + ... IndexableRelationAdapter) + So we are ready again to register a set of relations with our new relations registry and query it. diff --git a/relation/configure.zcml b/relation/configure.zcml index b94bda4..b317083 100644 --- a/relation/configure.zcml +++ b/relation/configure.zcml @@ -25,6 +25,12 @@ + +