-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Associations, Query
-
None
Hi!
I was trying to do an incremental or query on an associated object, and the resulting query was not what I expected, and I wondered if it was intentional.
band. members. or(active: true). or(retired: true) => #<Mongoid::Criteria selector: {"$or"=>[{"band_id"=>BSON::ObjectId('652f51ec236b7a3e02183c0c')}, {"active"=>true}, {"retired"=>true}]} options: {} class: Member embedded: false>
I was expecting the band_id criteria to be added to each of the array elements. Is there any way to do what I'm looking for? Or would this be considered a bug?
Thanks!