[Zope] How to suppress aquisition of an attribute in a Catalog

Jens Wolk jewo_lists@gmx.de
Thu, 18 Apr 2002 21:38:13 +0200


Hi everybody,

I have two custom classes: a folderish myFolder class and contentish 
myContent class. Objects of the myFolder class have the attribute 
folderAttribute. The objects of the myContent class do not have this 
attribute.

myContent objects typically reside inside a myFolder object. 

For example, I have an object 'AFolder' of the myFolder class in which 
resides the object 'AContent' of the myContent class. AFolder.folderAttribute 
is 'it is me!'.

In a catalog I created a field index 'folderAttribute'. Now, if I search the 
catalog for objects with folderAttribute = 'it is me!', the result set 
contains the AContent object, too, because it aquires the attribute from the 
containing AFolder object. 

Is there a way to suppress this behavior (apart from defining a 'dummy' 
attribute for myContent class or iterating through the result set and 
excluding all non-myFolder objects)?

Thank you very much.

Jens Wolk