[Zope-dev] Is _getOb() best way to grab a ref to a particular object?

Andrew Wilcox circle@gwi.net
Sun, 21 Nov 1999 09:27:59 -0500


I need to grab a reference to a particular object in the ZODB from an
external method, bypassing acquisition.  Is this the right way to do it:

    def test(self, REQUEST=None):
        """doc string"""
        myobj =
REQUEST.PARENTS[-1].aTopLevelFolder.anotherFolder._getOb('id_of_myobj')
        ...do stuff with myobj: myobj.title, myobj.index_html,
myobj.property = 123 ...