We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85da0d0 commit ad832e7Copy full SHA for ad832e7
spec/mongoid/criteria_spec.rb
@@ -2864,6 +2864,17 @@ def self.ages; self; end
2864
expect(selector['ratable_id']).to eq(movie.id)
2865
end
2866
2867
+
2868
+ context "when querying an embedded document with aliases" do
2869
2870
+ let(:criteria) do
2871
+ Person.where("phones.extension" => "123")
2872
+ end
2873
2874
+ it "expands the aliases" do
2875
+ expect(criteria.selector).to eq("mobile_phones.ext" => "123")
2876
2877
2878
2879
2880
context 'when given multiple keys in separate calls' do
0 commit comments