[ZCM] [ZC] 765/ 2 Reject "Quick bobobase_modification_time fix for ZCatalog"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Mon, 13 Jan 2003 10:54:55 -0500


Issue #765 Update (Reject) "Quick bobobase_modification_time fix for ZCatalog"
 Status Rejected, Zope/bug+solution low
To followup, visit:
  http://collector.zope.org/Zope/765

==============================================================
= Reject - Entry #2 by Caseman on Jan 13, 2003 10:54 am

 Status: Pending => Rejected

This will not work and will cause a write on read condition if an object is reindexed without being changed. Not to mention an incorrect value for bobobase_modification_time.

bobobase_modification_time is the wrong thing to use to tell the last time an object was modified. It changes for example when an object is simply locked an unlocked, or at other times the application cannot control. It is also not retained on imported object.

Your application should use a high level modification time that it controls. The CMF does this and can be used as an example.


________________________________________
= Request - Entry #1 by Zen on Jan 12, 2003 10:22 pm

If a ZCatalog uses bobobase_modification_time as an index or metadata, it will reflect the *previous* last modified time if an CatalogAware object is modified and reindex_object() called on it.

Simple fix is to add the following line to reindex_object
in CatalogAware and CatalogPathAware:
    self.bobobase_modification_time = DateTime()

And of course an 'from DateTime import DateTime' at the top.
==============================================================