[ZODB-Dev] StandaloneZCatalog queries

Christian Robottom Reis kiko@async.com.br
Sun, 20 Jan 2002 20:26:16 -0200 (BRST)


Hi there,

I've been experimenting with the Standalone ZCatalog, and I have a
question about how objects are to be retrieved.

In my current application, I've cooked my own Catalog objects (which are
rather dumb). They index and return real objects, keeping them in an
IOBTree, and when searches are performed upon them, I return lists (though
I could use buckets or whatever) of objects as results. 

>From what I've read, the ZCatalog returns brain objects with it's
searchResults() method; these objects are just placeholders for queried
data to avoid reviving all the objects hit at search time. However, the
brain object ought to provide a getObject() method which returns a real
object.

I can't get this method to work with the StandaloneZCatalog, possibly
because I don't really understand how the path mechanism ties things
together.

I think this stems from me not understanding how the Catalog works,
conceptually. I am beginning to suspect that an application will have one
Catalog for each object type, and these objects need to be addressed
through full paths (/foo/bar etc) instead of through oid or whatever
(which is what I use to address my objects in my current Catalogs). Am I
on the right track?

Anybody using the StandaloneZCatalog care to share some experience?

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL