couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Updates
Date Wed, 01 Jun 2011 16:37:53 GMT
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