I think you must call getObject() on the mybrains instance first
to get the object!
----- Original Message -----
From: "Nicholas Henke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 16:05
Subject: [ZODB-Dev] ZODB, Catalog and actually using it
I am playing with using the Catalog class in ZCatalog along with
to create a generic object layer on top of ZODB. I can index and search til
am blue in the face, and I always get the correct answers. Now for the
Say I have the following obj:
variable = 1
now if I do:
catalog = Catalog()
obj = test()
catalog_query = CatalogQuery(catalog, "variable==1")
results = catalog_query()
for r in results:
print r.variable # ok
print r.getRID() # ok
print r.function # NameError
...so I can get an object (a mybrains instance )back that allows me to print
r.variable, but I cannot get r.function().
How does one do this? Is there a mapping between RIDs in the catalog and
objects somewhere? Do I need to do that mapping in an IOBtree (it would make
the most sense since I am using id(obj) as the uid in the catalog)? Is there
somewhere in Zope/google/web that does this?
Thanks for any help!!
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - [EMAIL PROTECTED]
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -