[Zope-DB] Avoid Lost Updates?

Hannu Krosing hannu@tm.ee
16 Oct 2002 15:37:40 +0200


Martin Gebert kirjutas K, 16.10.2002 kell 14:01:
> 
> 
> M.-A. Lemburg schrieb:
> 
> > Martin Gebert wrote:
> >
> >
> > Why don't you save the data and the locking information in a
> > persistent user object and only write the new data to the database
> > when the user has finished working it ?
> 
> Huh? Sorry, I don't get what you're up to... :-(

Probably something like this:

make two fields/attributes:

edited_by, edited_since

and allow user to get the form for editing if edited_since is empty or
old enough (i.e.. it has timed out). When presenting the form to user
john, record the fact in these two fields and allow the edited data to
be written back when edited_by, and edited_since match.

--------
Hannu