Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-527

$all does not work correctly

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.7
    • Component/s: None
    • Labels:
      None

      There are no results returned when using $all in a query even though running the same query in a client will return results. If I change it to use $in it will return results. Here is an example of a query that works:

      {
      "PPL.ID" :

      { "$in" : [63,942] }

      ,
      "DUO" : true
      }

      Here is the one that doesn't:
      {
      "PPL.ID" :

      { "$all" : [63,942] }

      ,
      "DUO" : true
      }

      PPL is an array of objects:
      {
      "ID" : integer,
      "NAME" : string
      }

      I realize they are two different queries, but when I run the second query through another client it does return results. I included the version using "$in" to demonstrate that the query as set up in Java isn't broken. I am currently running against MongoDB version 1.6.3 on Windows.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            robert.widmer@finalsite.com Robert Widmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: