[Zope] OFS.History (question 2)

Tino Wildenhain tino at wildenhain.de
Mon Jan 24 04:34:17 EST 2005


On Mon, 2005-01-24 at 09:15 +0100, Pascal Peregrina wrote:
> First of all, thanks Dieter, that answered my question 1.
> 
> Now I've got a more serious problem.
> I have a CMF Document that wraps a PageTemplate object (it does not extend
> PageTemplate, but internally stores a PageTemplate instance).
> 
> It looks like when some revision of my object is retreived from ZODB, this
> does not include the wraped persistent objects that my object may contain.
> 
> For example, rev1._get_pt.read() and rev2._get_pt.read() always return the
> HTML of the current revision's wraped PageTemplate.
> (_get_pt() returns the wraped PageTemplate object)
> 
> Is there a workaround for this ?
> The only thing I can think of is storing the PageTemplate HTML at my object
> level each time it is changed, but that means storing the HTML twice in
> ZODB...
> I tried it, and of course it works.

The only workaround I see right now is to get the list of historic
versions for the subobject too, then select the version
which timestamp is just below or equal to the timestamp of the
container objects historical version.

Maybe I add something like that to the historical patch for folders.

Regards
Tino



More information about the Zope mailing list