Commit 6ec160ef authored by Romain Courteaud's avatar Romain Courteaud

QueryStorage: documents do not have an _id property anymore

parent c408d263
......@@ -156,10 +156,11 @@
if (is_manual_query_needed) {
len = result.length;
for (i = 0; i < len; i += 1) {
result[i].doc.__id = result[i].id;
data_rows.push(result[i].doc);
}
if (options.select_list) {
options.select_list.push("_id");
options.select_list.push("__id");
}
result = jIO.QueryFactory.create(options.query || "",
context._key_schema).
......@@ -178,13 +179,13 @@
len = result.length;
for (i = 0; i < len; i += 1) {
element = {
id: result[i]._id,
id: result[i].__id,
value: options.select_list ? result[i] : {},
doc: {}
};
if (options.select_list) {
// Does not work if user manually request _id
delete element.value._id;
// Does not work if user manually request __id
delete element.value.__id;
}
if (options.include_docs) {
// XXX To implement
......
......@@ -764,7 +764,6 @@
doc: {
title: "foo",
id: "ID foo",
_id: "foo",
another: "property"
}
}, {
......@@ -773,7 +772,6 @@
doc: {
title: "bar",
id: "ID bar",
_id: "bar",
another: "property"
}
}];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment