You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/04/27 21:33:22 UTC

[GitHub] wohali commented on issue #498: Document revision value requirement when updating

wohali commented on issue #498: Document revision value requirement when updating
URL: https://github.com/apache/couchdb/issues/498#issuecomment-297845488
 
 
   I think you are mistaken in your belief that CouchDB no longer requires the revision value for updating a document.
   
   ```
   $ curl -X PUT localhost:5984/foo
   {"ok":true}
   $ curl -X PUT localhost:5984/foo/bar -d '{"joan": "is great"}'
   {"ok":true,"id":"bar","rev":"1-9b0890fa11b66dc9f0cc4917e11553d1"}
   $ curl localhost:5984/foo/bar
   {"_id":"bar","_rev":"1-9b0890fa11b66dc9f0cc4917e11553d1","joan":"is great"}
   $ curl -X PUT localhost:5984/foo/bar -d '{"joan": "is still great"}'
   {"error":"conflict","reason":"Document update conflict."}
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services