incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniele Testa <daniele.te...@gmail.com>
Subject Re: Updates
Date Wed, 01 Jun 2011 16:46:10 GMT
Shouldn't that be up to the user? Why would the database protect me from that.

You would have the same "problem" in all databases. If I edit a page
in a CMS and in the meantime that I change the things in the form,
some other user might have edit that same page.

I don't see the problem why the user cannot specify something like
"_rev=latest".

Personally, I find it very cumbersome to have to do a GET every time I
need to do a PUT. It also makes the update slower, as I need to do 2
requests (sometimes over slow connections).

Regards,
Daniele


2011/6/1 Robert Newson <robert.newson@gmail.com>:
> We can't assume that, the document may have already changed between
> you reading it and updating it.
>
> http://guide.couchdb.org/editions/1/en/consistency.html
>
> B.
>
> On 1 June 2011 17:35, Daniele Testa <daniele.testa@gmail.com> wrote:
>> Hi,
>>
>> I am new to this mailing list so please forgive me if this is a stupid question.
>>
>> Why do I have to specify a revisionID when I do an update?
>> Can't couchdb just assume I meant to update the last revision if I
>> leave the revisionID empty?
>>
>> If I know that I want to update document with id=XYZ, do I have to
>> first do a GET/HEAD for that id to get the
>> last revision ID, and then run the PUT?
>>
>> I really hope there is a better way :)
>>
>> Regards,
>> Daniele
>>
>

Mime
View raw message