[Zope-CMF] modification date should not be bobobase_modification_time

Florent Guillaume fg@nuxeo.com
01 Jul 2002 12:59:41 +0200


[zope-cmf in Cc]

On Mon, 2002-07-01 at 00:59, Carl Rendell wrote:
> I was searching through the archives today looking for 
> bobobase_modification_time references, when I stumbled across this 
> posting from you.
> 
> Curious, is your implementation as part of a patch/hack to 
> DublinCore, or are you modifying a property on each of the objects?

Yes I'm basically adding to DublinCore (by subclassing it in essence).
 
> I was looking at doing the latter, a property on each object type 
> that is set at edit time via manage_changeProperties(), but that 
> would be tedious and lead to some hit and miss behavior. It also 
> might be missed in other circumstances - like when editing 
> metadata -

Yes, that's the downside, it has to be done by hand everyplace that
changes something.

> Ideally the attribute would be modified each time the 
> reindexObject() was called on the object right?

Hey, that's a GREAT idea! Never thought of it, but it makes perfect
sense. Tres, would changing modification_date to not call
bobobase_modification_ date but be updated at reindexObject time be ok
with you ?

> If you have implemented something.. could you briefly describe what 
> you've done? I'd prefer to implement a mechanism that is not 
> completely unique, and is - hopefully - well thought out.

Simply do everything by hand, as described below. But I'll do what you
propose in my projects, that's much better, even if it's not in base
CMF. Thanks for this idea.

Florent


> On Monday, April 22, 2002, at 02:27  PM, zope-cmf-request@zope.org 
> wrote:
> 
> > Message: 6
> > To: zope-cmf@zope.org
> > From: Florent Guillaume <fg@nuxeo.com>
> > Subject: Re: [Zope-CMF] modification date should not be 
> > bobobase_modification_time
> > Date: Mon, 22 Apr 2002 17:49:20 +0000 (UTC)
> > Organization: Nuxeo
> >
> > Ah, the convergence of ideas :-)
> >
> > I'm using pretty much the exact same code, with the following
> > differences:
> >
> > - modified() sets modification_date to the bobobase_modification_time()
> >   if it didn't exist,
> >
> > - setModificationDate's argument is optionnal, meaning set the current
> >   date.
> >
> > - _editMetadata always calls setModificationDate() as a policy.

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com