Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
4.2.0-rc2
-
Fully Compatible
-
ALL
-
Query 2019-07-15, Query 2019-07-29
Description
db.example.update({_id:1}, [ {$set:{ } } ])
|
WriteResult({ ...
|
"writeError" : {
|
"code" : 40177,
|
"errmsg" : "Invalid $addFields :: caused by :: specification must have at least one field"
|
}
|
})
|
Typing $set and getting an error for $addFields can be confusing. Would be cleaner to use the same stage name as user provided (especially when it's a one-to-one alias).