[Zope-DB] Avoid Lost Updates?

Martin Gebert Murphy.Gebert@gmx.de
Wed, 16 Oct 2002 15:02:53 +0200


Hannu Krosing schrieb:

>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.
>  
>
Hmm, well, a good idea. Anyhow, I don't like the idea that this solution 
is optional and can be forgotten/overridden, but it would work if you 
stick with it and you take access via Zope only.

I think I'll implement that on cases that definitely *mustn't* loose 
updates in any situation.

Thanks!

Martin