On Nov 17, 2008, at 10:20 AM, Alan Runyan wrote:
> On Mon, Nov 17, 2008 at 9:01 AM, Jim Fulton <[EMAIL PROTECTED]> wrote:
>> On Nov 17, 2008, at 8:21 AM, Andreas Jung wrote:
>>> Rephrasing my question in a different way: how can I get hold of the
>>> "parent" object based a persistent object with a _p_jar
>>> connection? E.g. when the ZODB commits a subobject (e.g. a BTree or
>>> a bucket) of portal_catalog/Indexes/some_index then I would like to
>>> get hold of the the related parent "first-class" Zope 2 object (e.g.
>>> derived from SimpleItem/Item or something like that).
>> There isn't a practical way to do that. (If you're willing to work
>> very very very hard, you can iterate over a database and build up a
>> reverese reference structure.)
> FWIW: I've wanted to do this same thing before but found no toolchain
> support and gave up.
It would probably be best to start with the `fsdump` tool. Here's a
transaction record from a dump I had lying around.
Trans #00720 tid=03744947f76dbf66 time=2008-03-07 20:23:57.991102
status='p' user='/ example.user.1' description="Deleted 'thirty
foot flat bar' [galleryphoto5]"
data #00000 oid=00000000000045f6 size=278
data #00001 oid=000000000002b67d size=305 class=BTrees._IFBTree.IFSet
data #00002 oid=000000000002b648 size=320 class=BTrees._IFBTree.IFSet
data #00003 oid=000000000002b67f size=320 class=BTrees._IFBTree.IFSet
data #00004 oid=0000000000006db8 size=295 class=BTrees._IFBTree.IFSet
data #00005 oid=0000000000004f15 size=823
data #00006 oid=0000000000004f0e size=325 class=BTrees._IFBTree.IFSet
data #00007 oid=0000000000003a9d size=1604
data #00008 oid=000000000002b61b size=830
data #00009 oid=0000000000037ad9 size=300 class=BTrees._IFBTree.IFSet
data #00010 oid=000000000002c6f5 size=568
data #00011 oid=000000000002b661 size=448
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org