On 9/9/10 13:03 , Kees Hink wrote:
> I'm subclassing an AT content type, minus one field which i remove in this 
> way:
>
> MyClass(ParentClass):
>      (...)
>      my_schema = parent_schema.copy()
>      my_schema.delField('unusedField')
>      (...)
>
> This works. However, the catalog tries to index this field [1]:
>
>    <index name="getUnusedField"
>           meta_type="FieldIndex">
>      <indexed_attr value="getUnusedField"/>
>    </index>
>
> Calling the "getUnusedField" on ParentClass works. It also works on all other
> classes. Only MyClass still has a generated accessor for the removed field,
> calls it, and can't find the attribute. For more details on the setup, see
> below. [2]

Isn't that expected behaviour? AT adds the accessor to your base class, 
which makes it accessible from your class as well. That is how class 
inheritance work.

Wichert.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to