[Zope3-dev] Index integration

Dieter Maurer dieter at handshake.de
Tue Feb 15 13:17:57 EST 2005


Jim Fulton wrote at 2005-2-14 14:26 -0500:
> ...
[JF]
>>>I'm not sure I follow this.  Are you saying that you'd generate
>>>an ObjectModified event for the dependent object and then decide the
>>>indexes to update according to the type of the dependent object?

[DM]
>> Indeed.
>> 
>> But the object for which the indexes are updated is
>> is not the dependent object but its primary object.
>> 
>> Dependent objects are not catalogued (indexed) by themselves.
>> With respect to cataloguing they behave as part of their
>> primary object.

[JF]
>Right. This feels pretty complicated.  Maybe I'm missunderstanding,
>or maybe I just need to think about it some more. :)

The complexity consists of a few lines of code only:

  The dependent object must know its primary.

  The catalog must check whether the object to be [un]catalogued
  implements "IDependentObject" and in this case
  determine the objects catalog id for the primary rather
  then the object itself.

On the positive side you get rid of lots of event definitions
(and their imports).


-- 
Dieter


More information about the Zope3-dev mailing list