Fred, I appreciate your quick response.
I am confused though. I thought the point of includes was to get all of the related objects in as few db calls as possible. From the log file, it is making individual calls for each classroom and each homeroom. So for every student, it finds that student's homeroom with one call, then finds that homeroom's classroom with another call. I supposed it will eventually cache all of the classrooms, but since homerooms is a join table, (one record for each student) it won't be able to. What about has_one :through in 2.1 is broken? I am running 2.1.2 Thanks for your help. Tom On Dec 3, 8:23 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Dec 2, 10:45 pm, hoenth <[EMAIL PROTECTED]> wrote: > > > Any idea why Rails seems to be ignoring the :include? > > It's not - that's the way it does includes now, one select per > association type (unless it has to fallback to the old joins based > code because conditions/order reference the included tables). In > addition :include of has_one through was broken in 2.1. > > Fred > > > > > Any help would be greatly appreciated. > > > Best, > > Tom --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---