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

Add note about dotted field names within $group to 3.4 compatibility changes

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      Due to a refactor during the 3.4 development cycle we no longer accept dotted field names inside a $group stage's _id field. So this pipeline no longer works, and returns an error of "FieldPath field names may not contain '.'"

      [{$group: {_id: {"name.subname": "$foo", bar: "$bar"}, count: {$sum: 1}}}]
      

      We should add a note about this to our compatibility notes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago