Hi,

Only a couple of lines of code needed to be changed in order to get
eager loading (:include option) working with a has_many association
that uses a custom finder_sql.  A similarly small change would be
needed to also make eager loading work with find_by_sql.

I'd like some feedback on whether it'd be worthwhile to make available
a patch that implements both of these.  I for one found such a capability
useful, however the custom sql must use eager loading's tn_rn aliasing,
correctly matching attribute names and aliases.  This is tricky to
implement, maintain, and document.

Mark
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to