Re: [Zope3-Users] How do I find out references to objects in ZODB
Am 02.05.2008 um 16:17 schrieb Yuan HOng: Hi, Is it possible to find out what other objects are referencing a particular object in ZODB? In particular, I want to prevent some content objects, like images, from being removed from the folder if they are used in some other content object, like a news article. Do I have to keep track of object referencing in ZODB myself through events or there are some built-in mechanism in ZODB to take care of this for me? Hi, maybe gocept.reference[1] can help you. [1] http://pypi.python.org/pypi/gocept.reference/0.2 -- Yours sincerely, Michael Howitz gocept gmbh co. kg · forsterstrasse 29 · 06112 halle/saale www.gocept.com · fon: +49 345 12298898 · fax: +49 345 12298891 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How do I find out references to objects in ZODB
On Fri, May 02, 2008 at 10:17:46PM +0800, Yuan HOng wrote: Is it possible to find out what other objects are referencing a particular object in ZODB? Not easily -- you'd have to traverse the object graph yourself to see if you can find any references. In particular, I want to prevent some content objects, like images, from being removed from the folder if they are used in some other content object, like a news article. Do I have to keep track of object referencing in ZODB myself through events or there are some built-in mechanism in ZODB to take care of this for me? Your best bet is to keep track of this yourself. Indexes and catalogs may help. Marius Gedminas -- Given enough eyeballs all bugs are shallow. -- Eric S. Raymond, The Cathedral and the Bazaar signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users