Hey :)

I need some guidance from ZODB gurus.

Christian Theune and me have implemented a diffed history feature for Archetypes based content types. It's part of ATContentTypes and is meant to help reviewers to see the differences between different revisions of an object. The code is using the method OFS.History.historicalRevision + db().oldstate() to iterate over the ZODB revisions of the object.

The code was working very well because we were using AttributeStorage. AS stores the data of Archetype fields as a simple attribute on the object. For security and performance reasons I have implemented annotation storage that is using Zope3 style attribute annotations to store the data in an OOBTree attached to the object. With AnnotationStorage the history isn't working any more because historicalRevision() returns only an older version of the object but *not* older versions of its subobjects like the btree. Even trying to get the different revisions of the oobtree didn't help. The symptoms were the same. I assume I have to get the revisions of the btree bucket or choose a different path.

I had the idea of getting a snapshot of the entire ZODB for a given transaction serial number but I don't know how to get it. Is this possible?

The code for the feature including some tries is in:

http://svn.plone.org/collective/ATContentTypes/branches/tiran-ann-history-fix/lib/historyaware.py

Christian (Tiran)
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to