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 <[email protected]> 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 >
