-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Query
Like and/or/nor, not's signature accepts any number of arguments, but only the first one is actually processed:
irb(main):037:0> Band.not(a:1) => #<Mongoid::Criteria selector: {"a"=>{"$not"=>1}} options: {} class: Band embedded: false> irb(main):038:0> Band.not(a:1, b:2) => #<Mongoid::Criteria selector: {"a"=>{"$not"=>1}, "b"=>{"$not"=>2}} options: {} class: Band embedded: false> irb(main):039:0> Band.not({a:1}, {b:2}) => #<Mongoid::Criteria selector: {"a"=>{"$not"=>1}} options: {} class: Band embedded: false> irb(main):040:0> Band.or({a:1}, {b:2}) => #<Mongoid::Criteria selector: {"$or"=>[{"a"=>1}, {"b"=>2}]} options: {} class: Band embedded: false>
- duplicates
-
MONGOID-4697 Implement Arel-style "and", "or" and "not" combination of scopes
- Closed
- links to