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

querying with a combination of $all and $exists does not work

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.1
    • Component/s: Querying
    • Environment:
      Mac OSX
    • OS X

      Given the following record in a collection named "tests":

      {
      name : "Testing",
      values : [

      {value1 : 123}

      ,

      {value2 : 456}

      ]
      }

      This query returns the record:
      db.tests.find({values : { $all : [

      {value1 : 123 }

      ] } } )

      This query does not return the record:
      db.tests.find({values : { $all : [ {value1 :

      { $exists : true }

      } ] } } )

      That seems incorrect. Am I doing anything wrong or should this work?

            Assignee:
            Unassigned Unassigned
            Reporter:
            edshadi Ed Shadi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: