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

Projected field order different under new query framework

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change
    • ALL

      It used to be based on document field order, but is now based on the order in the projection spec.

      > db.order.drop()
      true
      > db.order.insert({_id:1, first:1, second:1})
      { "ok" : 1, "n" : 1 }
      > db.order.findOne({}, {second:1, first:1})
      { "_id" : 1, "second" : 1, "first" : 1 }
      
      // Old query system
      > db.adminCommand({setParameter:1, newQueryFrameworkEnabled: false})
      { "was" : true, "ok" : 1 }
      > db.order.findOne({}, {second:1, first:1})
      { "_id" : 1, "first" : 1, "second" : 1 }
      

            Assignee:
            hari.khalsa@10gen.com hari.khalsa@10gen.com
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: