2010-01-16 10:25:32 -05:00
|
|
|
|
|
|
|
|
t = db.updateb;
|
|
|
|
|
t.drop();
|
|
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
t.update({"x.y": 2}, {$inc: {a: 7}}, true);
|
2010-01-16 10:25:32 -05:00
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
correct = {
|
|
|
|
|
a: 7,
|
|
|
|
|
x: {y: 2}
|
|
|
|
|
};
|
2010-01-16 10:25:32 -05:00
|
|
|
got = t.findOne();
|
|
|
|
|
delete got._id;
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.docEq(correct, got, "A");
|