-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.0-rc2
-
Component/s: Aggregation Framework
-
Fully Compatible
-
ALL
-
Query 2019-07-15, Query 2019-07-29
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).