Permalink
Browse files

Use for_ids within multiple_from_map_or_db

  • Loading branch information...
1 parent e0f7c3c commit 601d0909ea402252eb9195aa33c9e4445452003b @Empact committed Apr 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongoid/criteria.rb
View
@@ -367,7 +367,7 @@ def multiple_from_map_or_db(ids)
result, not_in_map = ids.
map{ |id| IdentityMap.get(klass, id) || id }.
partition{ |id| id.is_a?(klass) }
- result += klass.where(:_id.in => not_in_map).entries
+ result += for_ids(not_in_map).entries
result.select{ |e| e.matches?(selector) }
end

0 comments on commit 601d090

Please sign in to comment.