[Zope] Object propogation
   
    Dieter Maurer
     
    dieter@handshake.de
       
    Fri, 20 Dec 2002 19:58:27 +0100
    
    
  
David Mackay writes:
 > ... batched "next" does not work ...
 > It does complain that the ContentText (the textindex) is not present for 
 > the subsequent requests.  I can get it to re-execute for subsequent 
 > requests by passing that in the url.  Since I'm searching a rather large 
 > record set, I was hoping to avoid the repetition of the search.  I tried 
 > saving the returned list in the session data, but I got a traceback 
 > saying that the object was unpickleable.
 > 
 > Do you have any suggestions as to how to preserve the list of mybrains 
 > objects so that I can access that, rather than re-executing the query?
You cannot preserve the sequence of "mybrain" objects, but you
can store their record ids and resolve the ids later into the objects
by means of a catalog method.
For details, please read the "ZCatalog" section of
  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
It tells you the exact name of the record id and the name of the
catalog method.
You are probably also interested in Pythons "list comprehension":
    [x.record_id_ for x in catalog(...)]
Dieter
PS: Please stay on the list.