blob: 7276d33e5ef585c7c09c9af95ab34bbed0ea5092 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// @tags: [
// requires_fastcount,
// ]
let t = db.update_invalid1;
t.drop();
t.update({_id: 5}, {$set: {$inc: {x: 5}}}, true);
// From version 5.0 on field names with dots and dollars are enabled and only top-level $-prefixed
// fields are validated. The field '$inc' appears at a lower level than the operator $set, so it is
// accepted by the update validation.
assert.eq(1, t.count(), "A1");
|