How to get a catalogware object's ZCatalog
Hi there, I have a catalog aware object "myobj" in the ZODB which is cataloged in a ZCatalog "MyCatatlog". Is there a way to get the ZCatalog in which myobj is cataloged if I have the myobj object ? Thanks in advance. -nico ____________________________________________________________________________ Jetzt bei WEB.DE FreeMail anmelden = 1qm Regenwald schuetzen! Helfen Sie mit! Nutzen Sie den Serien-Testsieger. http://user.web.de/Regenwald
Nico Grubert wrote:
Hi there,
I have a catalog aware object "myobj" in the ZODB which is cataloged in a ZCatalog "MyCatatlog". Is there a way to get the ZCatalog in which myobj is cataloged if I have the myobj object ?
Such an object should have an attribute named default_catalog. So, getattr(myobj,myobj.default_catalog) should give you the catalog object via acquisition. HTH, oliver
participants (2)
-
Nico Grubert -
Oliver Bleutgen