[CDRIVER-1975] Mixed $ and non-$ query operators shouldn't be prohibited Created: 01/Jan/17  Updated: 10/Jan/17  Resolved: 10/Jan/17

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.5.0
Fix Version/s: 1.5.2

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-1692 mongoc_collection_find_with_opts() co... Closed

 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.



 Comments   
Comment by Githook User [ 10/Jan/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1975 allow mixed $ and non-$ query ops
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2e2bd128838804727265b4d224cf7cd3841f823c

Comment by Githook User [ 10/Jan/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1975 allow mixed $ and non-$ query ops
Branch: r1.5
https://github.com/mongodb/mongo-c-driver/commit/97049fe1020a656eb4031969ec6abe6386f81137

Comment by A. Jesse Jiryu Davis [ 01/Jan/17 ]

Reported by a Monary user:

https://bitbucket.org/djcbeach/monary/issues/26/cannot-use-or-or-any-dollar-sign-top-level

Generated at Wed Feb 07 21:13:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.