Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50041

Preserve field order between $set clause and updated document

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • mongodb 4.0.4
    • Query 2020-11-30, Query 2020-12-14

    Description

      Using { $set:{ b:1, a:1 } } for updating results in { a:1, b:1 }.

      If I use older version like mongodb 3.4.0, the result will be { b:1, a:1 }.

      Attachments

        Activity

          People

            bernard.gorman@mongodb.com Bernard Gorman
            mysyljr@gmail.com 俊仁 梁
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: