[Zope-CMF] Help on catalog query

Florent Guillaume fg@nuxeo.com
Mon, 18 Mar 2002 16:32:26 +0000 (UTC)


Actually
  context.portal_catalog(blah)
and
  context.portal_catalog.searchResults(blah)
are the same thing.

Florent

Gitte Wange <gitte@mmmanager.org> wrote:
> -=-=-=-=-=-
> 
> Hi,
> 
> Sorry for my late reply ...
> 
> Normally ... wouldn't you call catalog.searchResults for getting the brains
> objects ?
> 
> TIA,
> Gitte Wange
>   ----- Original Message ----- 
>   From: Andrew Sawyers 
>   To: Gitte Wange ; zope-cmf@zope.org 
>   Sent: Friday, March 15, 2002 5:12 PM
>   Subject: RE: [Zope-CMF] Help on catalog query
> 
> 
>   If you just want to return back brains objects, the following worked for
> me in the debugger:
>   types = ['ItemType1', 'ItemType2']
>   catalog = root.portal.portal_catalog
>   res = []
>   for t in types:
>       res.append(catalog(Type=t))
> 
>   Hope this helps,
>   Andrew
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10  http://nuxeo.com  mailto:fg@nuxeo.com