Hi Johan,

   Have a look at http://www.zope.org/Members/sspickle/DumbZPatternsExample

The best way I've found is to provide a method (or methods) in the 
Specialist of the contained item to get ids of those instances satisfying certain 

e.g., getToDoIdsForDoer( aDoer )

(the contained item keeps a reference to the id of its container.)

>>>>> "Johan" == Johan Carlsson <[EMAIL PROTECTED]> writes:

    Johan> Hi, How could containment be implemented with ZPatterns.

    Johan> Container -n-----1- ContainedItem -n-----1-
    Johan> ContainedSubItem

    Johan> I suppose there would be a Containter Specialist containing
    Johan> a ContainerItem Specialist.  But Specialists retrieve
    Johan> objects by IDs so there would also be a list of
    Johan> ContainerItem ID in the Container object.

    Johan> Are there any other way to do it, for instance keeping a
    Johan> list of object references that would be retrieve from the
    Johan> ContainerItem Specialist by a attribute provider in the
    Johan> Containter Specialist? But I still need the list of IDs
    Johan> don't I or how else would the ContainerItem Specialist know
    Johan> what objects to return?

    Johan> TIA, Johan Carlsson
    Johan> ٢

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to