[Zope-CMF] Re: Metatype() standard?
r.ritz at biologie.hu-berlin.de
Fri Mar 5 09:54:36 EST 2004
Tres Seaver wrote:
> Nope. The CMF *never* cares about meta_type, except as a fallback for
> objects which don't have 'portal_type'; this allows the same class
Well, not really. Methods like 'contentValues/Ids/Items'
which provide a filtered view on 'objectValues/Ids/Items'
call these methods from OFS.ObjectManager in which
if ob['meta_type'] in spec:
gets called in 'objectIds' as soon as you specify a type/types
to filter on. From this I figured that meta_type is important
for content objects too. Maybe this is a bug and 'spec'
should not be passed to the objectIds call in contentValues/Ids/Items
but that's what currently happens.
PS: I was hit by this when I wrote my custom archetypes based
news item content type. Unfortunatly it turned out to be
non-trivial to have a meta_type's value including a blank
due to some name magic in the generators but that's a different
More information about the Zope-CMF