in validation functions, new_doc does not contain the rev that was sent in the 
request 
---------------------------------------------------------------------------------------

                 Key: COUCHDB-294
                 URL: https://issues.apache.org/jira/browse/COUCHDB-294
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 0.9
         Environment: ubuntu
            Reporter: Tim


The new_doc in a validation does not contain the revision that you sent in the 
post/put request. 

In this log, each block contains a log of 

[info] old_doc
[info] new_doc
[info] request

{{{


new doc
-------

[info] [<0.68.0>] OS Process Log Message: null
[info] [<0.68.0>] OS Process Log Message: {"_id": "wibble","_rev": 
"1-3141321355","_revisions": {"start": 1,"ids": ["3141321355"]}}
[info] [<0.935.0>] 127.0.0.1 - - 'PUT' /conflict/wibble 201


update 1st rev, no conflict
---------------------------

[info] [<0.68.0>] OS Process Log Message: {"_id": "wibble","_rev": 
"1-3141321355","_revisions": {"start": 1,"ids": ["3141321355"]}}
[info] [<0.68.0>] OS Process Log Message: {"_id": "wibble","_rev": 
"2-1123114967","_revisions": {"start": 2,"ids": ["1123114967","3141321355"]}}
[info] [<0.977.0>] 127.0.0.1 - - 'POST' /conflict/_bulk_docs 201

As you can see on this second request, the document sent will have had a rev of 
"1-3141321355" but in the validation function the new_doc has the rev that is 
just about to be written to disk.. I cannot see a way to access the rev that 
was sent across the request.

}}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to