-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Query
-
None
Following 4697 where and and function identically but produce different query shapes:
irb(main):001:0> Band.where(name: 1).where(name: 2).selector => {"$and"=>[{"name"=>"1"}], "name"=>"2"} irb(main):002:0> Band.where(name: 1).and(name: 2).selector => {"name"=>"1", "$and"=>[{"name"=>"2"}]}
This ticket is to make them produce the same query shape, which should also be consistent with what or produces if possible.
- related to
-
MONGOID-4697 Implement Arel-style "and", "or" and "not" combination of scopes
- Closed
- links to