Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.4.6, 2.5.4
-
None
-
Standalone, OSX
-
ALL
Description
Test failure in QA-322/dollarsigns.js
// Test that '$id', '$db', and '$ref' are acceptable field names in
// the correct case (ie, subdoc) but not otherwise.
// SERVER-3231
coll.update(
, { $set: { $id: 1, $db: 1, $ref: 1 }});
var gle = db.runCommand(
);
assert(gle.err != null, 'gleObj: ' + tojson(gle));
coll.update(
,
{ n: 0 });
coll.update(
{ n: 0 }, { $set: { 'x.$id': 1, 'x.$db': 1, 'x.$ref': 1 }});
var gle = db.runCommand(
);
assert(gle.err == null, 'gleObj: ' + tojson(gle));
coll.update(
,
{ n: 0 });
Assert thrown from second update:
2013-12-12T12:39:01.485-0500 assert failed : gleObj:
{ "err" : "The DBRef $db field must be a String, not a NumberDouble", "code" : 55, "n" : 0, "connectionId" : 171, "ok" : 1 }at src/mongo/shell/assert.js:7