Can't $project into _id

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.foo.drop()
      true
      > db.foo.insert({_id:'ID', other: 'OTHER'})
      > db.foo.aggregate({$project:{_id:'$other'}})
      { "result" : [ { "_id" : "ID", "_id" : "ID" } ], "ok" : 1 }
      

      Expected result: {_id: 'OTHER'}

            Assignee:
            Mathias Stearn
            Reporter:
            Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: