dot notation of projections doesn't work on embedded "_id" field

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.0.2
    • Component/s: Querying
    • None
    • ALL
    • Hide
      db.test.save({ "_id" : { "d" : "x", "f" : "z" }})
      db.test.find({},{"_id.d":1})  // should return {_id:{d:"x"}} instead of { "_id" : { "d" : "x", "f" : "z" }}
      
      Show
      db.test.save({ "_id" : { "d" : "x" , "f" : "z" }}) db.test.find({},{ "_id.d" :1}) // should return {_id:{d: "x" }} instead of { "_id" : { "d" : "x" , "f" : "z" }}
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If "_id" is an embedded field, then dot notation of projections doesn't work on that field.
      I think "_id" field should be able to projection to avoid unnecessary data transform

              Assignee:
              Unassigned
              Reporter:
              Jia Hongchao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: