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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.6, 2.2.0
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      linux
    • ALL
    • 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 } >

      query result all

            Assignee:
            Unassigned Unassigned
            Reporter:
            jackwang Jack Wang
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: