-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
Description
When designing the $merge stage we realized that using a set of 'on' fields other than _id will often result in the user accidentally trying to modify the _id of the target document. When the 'whenMatched' mode is "merge" (the default), the update generated by the $merge stage will include the _id from the document in the pipeline which is likely different than the one targeted by the 'on' fields. Further, because $project includes the _id by default, it might not be obvious to users whether the document going into $merge has an _id at all.
cc asya