-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Another instance of https://jira.mongodb.org/browse/MONGOID-4202
class Foo include Mongoid::Document embeds_many :bars end class Bar include Mongoid::Document embedded_in :foo field :name, :type => String end f = Foo.new f.bars.build(:name => "Building") f.save() # This is what was fixed in MONGOID-4202 f.bars.where(:name => {:$not => /build/}).count => 1 # But these two should definitely == 1 f.bars.where(:$and => [{:name => {:$not => /build/}}]).count => 0 f.bars.where(:$or => [{:name => {:$not => /build/}}]).count => 0