[Zope-CMF] Re: [RFC] modification date

Florent Guillaume fg@nuxeo.com
Thu, 4 Jul 2002 16:46:53 +0000 (UTC)


My idea was to use only reindexObject, indexObject is not really needed
(wouldn't hurt though).

For objects not reindexed since their factory creation, the
modification_date attribute would be None but ModificationDate() and
modified() would fall back on the creation_date in that case.

Or modification_date could be set like creation_date at creation time,
but we'd still have to take into account a None value in the case of an
upgrade from an older version of DublinCore which didn't have a
modification_date attribute.

Florent


Carl Rendell  <cer@sol43.com> wrote:
> Florent,
> 
> After looking at CMFCatalogAware, I'm in agreement but do have a 
> comment.
> 
> Should the change effect indexObject() as well? Its called when 
> adding an object - as part of manage_afterAdd() for example - and 
> could be the first time the modification_date is set. If not.. 
> we'll have 'orphan' objects when users have stopped in the middle 
> processing, which do not have modification_date set.
> 
> ~C
> 
> 
> On Thursday, July 4, 2002, at 03:36  AM, zope-cmf-request@zope.org 
> wrote:
> 
> > Message: 9
> > To: zope-cmf@zope.org
> > From: Florent Guillaume <fg@nuxeo.com>
> > Date: Thu, 4 Jul 2002 10:10:59 +0000 (UTC)
> > Organization: Nuxeo
> > Subject: [Zope-CMF] [RFC] modification date
> >
> > I want to change in CVS the treatment of the modification date to make
> > it not rely on bobobase_modification_time, using the following 
> > idea from
> > Carl Rendell:
> >
> >> Ideally the attribute would be modified each time the reindexObject()
> >> was called on the object, right?
> >
> > I think it would work very well: in CMFCatalogAware's reindexObject, if
> > the object has a modification_date attribute, then update it. In
> > DublinCore, use modification_date instead of falling back on
> > bobobase_modification_time.
> >
> > Comments ?
> >
> > Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com