-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Whenever I eager load associations I see duplicate queries in my logs, with the second query including the included foreign key. Bug?
blog = Blog.first posts = blog.posts.includes(:user).limit(10).to_a MONGODB mydb_development['posts'].find({:_id=>{"$in"=>[BSON::ObjectId('4f03bdb813a7734267000004'), BSON::ObjectId('4f03b66f13a7734267000002')]}}) MONGODB mydb_development['posts'].find({:_id=>{"$in"=>[BSON::ObjectId('4f03bdb813a7734267000004'), BSON::ObjectId('4f03b66f13a7734267000002')]}}, {"user_id"=>1})