Joachim Schmitz wrote at 2007-10-19 10:03 +0200:
>If one iterates over the result of a portal_catalog search, for each 
>brain there are about 8 datetime objects loaded (one for each 
>dateindex), which quickly fills the memory.
>how can I access only the brain id

You can get the brain id via "brain.getRID()".

While it would not be necessary in principle (the "rid" is not part of
the meta data tuple) I am not sure whether access to the "rid"
nevertheless loads the tuple (and thereby your "DateTime" objects).

But you can access the rids avoiding the brains altogether:

  The usual catalog result is a "Products.ZCatalog.Lazy.LazyMap"
  instance. Its "_seq" attribute (obviously private) contains
  the sequences of rids corresponding to the query hits.

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to