On 09/09/2010 01:14 PM, Wichert Akkerman wrote:
> 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.

I guess so, I was probably being too simplistic in assuming that delField()
would also remove the accessor.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to