While we're on the topic, another place where eager loading falls down is on tables with large fields that aren't needed. Sometimes you need eager loading, but one of the tables has some large fields you don't need. Normally you could :select only what you needed, but of course that doesn't work with eager loading where the :select attribute is ignored. I've run into a few other cases where I needed eager loading but for one reason or another it resulted in poor performance or had other limitations. The more I think about it, the more I think it would be really cool to be able to "manually" eager load with :select and :joins options (or possibly even find_by_sql).
The ability to instantiate multiple model types from a single query in a more flexible way than vanilla eager-loading would be quite useful. The tricky part would be coming up with a clean interface. Anyway, just food for thought. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
