-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.1
-
Component/s: Write Ops
-
None
-
ALL
-
> db.runCommand({ findAndModify: "foo", query:{_id: ObjectId("536beb62fe2ac487fb241614")}, update:{$set : {} }, upsert:true} ) { "value" : null, "errmsg" : "exception: '$set' is empty. You must specify a field like so: {$mod: {<field>: ...}}", "code" : 9, "ok" : 0 } > db.foo.update({_id: ObjectId("536beb62fe2ac487fb241614")},{$set:{}},true) WriteResult({ "nMatched" : 0, "nUpserted" : 0, "nModified" : 0, "writeError" : { "code" : 9, "errmsg" : "'$set' is empty. You must specify a field like so: {$mod: {<field>: ...}}" } })
- duplicates
-
SERVER-12266 Update no longer allows empty modifier objects
- Closed
- related to
-
SERVER-13688 Picky errors from 2.6 are needlessly backwards incompatible
- Closed
-
SERVER-13883 findAndModify() cannot take an empty update object, but update() can
- Closed