Requests to different views at the same URL result in the same ETag
-------------------------------------------------------------------
Key: COUCHDB-909
URL: https://issues.apache.org/jira/browse/COUCHDB-909
Project: CouchDB
Issue Type: Bug
Components: HTTP Interface
Affects Versions: 1.0.1
Environment: Tested on OS X 10.6.4
Reporter: Tim Hart
Priority: Critical
Steps to reproduce:
1. Create a database, 'test_db'
2. Insert design document:
{
"_id":"_design/fetch",
"language":"javascript",
"views":{
"fetchKeys":{
"map": "function(doc) {
var recordType = doc.type;
for(var key in doc){
if(/.+_id$/.test(key)){
emit({type:recordType, fKey:doc[key]}, null);
}
}
}"
}
}
}
3. PUT document A @ '/test_db/parent_id' : '{"_id":"parent_id",
"type":"parent"}'
4. POST document B @ '/test_db' : '{"type":"child", "parent_id":"parent_id"}' -
Note the assigned ID
5. Query the view with
"/test_db/_design/fetch/_view/fetchKeys?key%5Btype%5D=child&key%5Bfkey%5D=parent_id&include_docs=true"
- Note the resulting ETAg
6. Delete the database 'test_db'
7. Repeat steps 1 - 5. Note the resulting ETag from the second query is the
same as the first, although the results of the query are slightly different
(same key, different associated document ID)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.