-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.2.1
-
Component/s: Query
-
None
Selector.merge!() incorrectly handles nested Hash's containing `$in` and `$nin` operators, where one operator is a String and the other is a Symbol. This PR fixes this issue, along with unit tests that repro the problem behavior in the old code.
This change was originally inspired by a Symbol-String bug manifesting in a chained Query.where().where(). A key cause of this bug was in Selector.merge!(). The second change which fixes the higher level Query.where().where() bug is part of a different module (Storable vs. Selector). I will be submitting that fix + test case(s) in a separate PR.
The PR is already ready to be reviewed/merged: https://github.com/mongodb/mongoid/pull/4965
- is related to
-
MONGOID-5074 Fix how Selector.multi_selection? handles symbols
- Closed
- related to
-
MONGOID-5067 Fix Storable.add_field_expression() when adding a nested String operator equivalent to an existing nested Symbol operator
- Closed