> db.x.save({}) > db.x.update({}, {$set: {'a.b': 1}, $inc: {a: 1}}) Cannot apply $inc to a value of non-numeric type._id: ObjectId('52697da65d5cfc4b53b1838e') has the field a of non-numeric type Object
There should be a space before _id and the field name should be quoted, as shown below:
Cannot apply $inc to a value of non-numeric type. _id: ObjectId('52697da65d5cfc4b53b1838e') has the field 'a' of non-numeric type Object
Further error string improvements are described in the comments.
- is related to
-
SERVER-11188 update $bit error messages are unclear
-
- Closed
-
-
SERVER-11197 $push error messages unclear
-
- Closed
-
- related to
-
SERVER-11623 Error message typos in modifier_push.cpp
-
- Closed
-