Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1975

Mixed $ and non-$ query operators shouldn't be prohibited

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.2
    • 1.5.0
    • libmongoc
    • None

    Description

      Introduced in CDRIVER-1692 circa commit 971af90ac2. Valid queries that mix $ and non-$ operators are prohibited, but they shouldn't be. An example of such a query is:

      {"$or":[{"field1":1},{"field2":2}], "field3":3}
      

      This results in cursor failure:

      Cannot mix top-level query with dollar keys such as $orderby.
      Use {$query: {},...} instead.
      

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: