1
0
Fork 0

Fixed array indexing if the attribute is not set

This commit is contained in:
Michael Hackstein 2015-10-22 12:13:47 +02:00
parent d6e2e69fb0
commit 7ea4130103
2 changed files with 3 additions and 3 deletions

View File

@ -666,7 +666,7 @@ int HashIndex::insertMulti (TRI_doc_mptr_t const* doc,
return TRI_ERROR_NO_ERROR;
}
// This is TRI_RESULT_ELEMENT_EXISTS, but this should not happen:
return TRI_ERROR_INTERNAL;
return TRI_ERROR_NO_ERROR;
}
return TRI_ERROR_NO_ERROR;

View File

@ -298,7 +298,6 @@ function arrayHashIndexSuite () {
assertEqual(res.length, 0);
},
/*
testInsertAndReadNestedElements: function () {
var idx = collection.ensureHashIndex("a[*].b").id;
var id1 = collection.save({a: [{b: 1}]})._id;
@ -306,6 +305,7 @@ function arrayHashIndexSuite () {
collection.save({a: [1,2,3]});
collection.save({b: [1,2,3]});
/*
var res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 1} }, 0, null).documents;
assertEqual(res.length, 2);
assertEqual(res[0]._id, id1);
@ -314,8 +314,8 @@ function arrayHashIndexSuite () {
res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 2} }, 0, null).documents;
assertEqual(res.length, 1);
assertEqual(res[0]._id, id2);
*/
},
*/
};
}