Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10869

Expand $project changes in 3.2->3.4 compatibility changes

      During the 3.4 development cycle we re-wrote the $project stage. Our compatibility notes already list one $project compatibility change, but there are more that are worth mentioning. Specifically, the following:

      {$project: {a: {b: "$missingField"}}} used to be {}, now (3.4+) is {a: {}}
      {$project: {'a.b': <expression>}} used to be {'a.b': <result of expression>}, now is an error (field names with dots aren't really supported elsewhere)
      _id will always show up in explain output for inclusion projections, even if not explicitly mentioned.
      

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              1 year, 25 weeks, 6 days ago