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

shell supports "query" works as a meta-operator - only "$query" should be supported

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 2.0.6, 2.2.0
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      linux
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      connecting to: test
      > db.a.drop();
      true
      > db.a.insert({a: 1});
      > db.a.insert({a: 2});
      > db.a.insert({a: 3});
      > db.a.find({q:1});
      > db.a.find({query:1});
      > db.a.find({query:{}});
      { "_id" : ObjectId("50d7a88bd49137e7c8a0658a"), "a" : 1 }
      { "_id" : ObjectId("50d7a890d49137e7c8a0658b"), "a" : 2 }
      { "_id" : ObjectId("50d7a893d49137e7c8a0658c"), "a" : 3 }
      > db.a.find({query:{a:1}});
      { "_id" : ObjectId("50d7a88bd49137e7c8a0658a"), "a" : 1 }
      >
      

      Show
      connecting to: test > db.a.drop(); true > db.a.insert({a: 1}); > db.a.insert({a: 2}); > db.a.insert({a: 3}); > db.a.find({q:1}); > db.a.find({query:1}); > db.a.find({query:{}}); { "_id" : ObjectId("50d7a88bd49137e7c8a0658a"), "a" : 1 } { "_id" : ObjectId("50d7a890d49137e7c8a0658b"), "a" : 2 } { "_id" : ObjectId("50d7a893d49137e7c8a0658c"), "a" : 3 } > db.a.find({query:{a:1}}); { "_id" : ObjectId("50d7a88bd49137e7c8a0658a"), "a" : 1 } >

      Description

      query result all

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: