[Zope-CMF] meta_type != content_meta_type

seb bacon seb@jamkit.com
Mon, 22 Oct 2001 13:01:05 +0100


* seb bacon <seb@jamkit.com> [011018 18:49]:
> Hi,
> 
> When I create a new TypeInformation 'MyFoo', based on an
> existing class 'Foo', but with its own meta_type 'My Foo',
> instances of it do not appear in lists such as contentValues(). 
> 
> This is because contentValues() passes a list of meta_types for
> objectValues() to filter by.  The list passed from contentValues() is
> a list of content_meta_types (i.e. 'My Foo'); but objectValues()
> compares it to meta_types (i.e. 'Foo').

OK, my solution was to add a new attribute to TypeInformation,
base_meta_data, and a new parameter to listContentTypes, viz:

   def listContentTypes( self, container=None, 
                               by_metatype=0,
                               by_base_metatype=0 )

Then PortalFolder._morphSpec returns a list of base meta_types for use
with objectIds.

Does this sound OK?

seb