Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
    • Environment:
      2.0.2 installed via Homebrew on Mac OS X 10.6.8
    • Operating System:
      OS X

      Description

      I expect the two findOne queries here to return the same result. This seems like a bug:

      $ mongo
      MongoDB shell version: 2.0.2
      connecting to: test
      > db.test.drop()
      true
      > db.test.insert(

      { x: 1, y: 2 }

      )
      > db.test.findOne(

      { x: 1, y: 2 }

      )

      { "_id" : ObjectId("4f0885cd61d25fd4a5813ae2"), "x" : 1, "y" : 2 }

      > db.test.findOne({ $and: [

      { x: 1 }

      ,

      { y: 2 }

      ] })
      null

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: