On Sep 6, 4:23 pm, Dmitry Suzdalev <dim...@gmail.com> wrote: > On Tuesday, September 6, 2011 7:12:05 PM UTC+4, Frederick Cheung wrote: > > > From which version did you upgrade? > > Upgraded from 3.0.10. > Before upgrading I ran all of my tests to ensure they pass. > After upgrading got a couple of test failures related to this issue... > > > Part of the problem with include is that there has (for some years > > now) been two different code paths that rails can do down when there > > > is an :include option, one that uses joins and one that doesn't. > > Rails tries to pick the right one if it things you are references the > > joined columns elsewhere in your code, but that detection has never > > been 100% > > I see... > > > If my memory is correct, the eager_load option forces the use of the > > join variant. > > eager_load is some configuration option?
It's an option for individual finds that works just like includes, but forces rails to use a left join, so instead of doing SomeModel.includes(:some_association) you can do SomeModel.eager_load(:some_association). I assume that you can also pass it as an option to find. Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.