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

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

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

      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.
      

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

              Created:
              Updated:
              Resolved: