# Eager Loading with custom :finder\_sql

**URL:** <https://discuss.rubyonrails.org/t/eager-loading-with-custom-finder-sql/10596>\
**Category:** rubyonrails-talk\
**Created:** [March 21, 2007, 8:57pm UTC](https://discuss.rubyonrails.org/t/eager-loading-with-custom-finder-sql/10596 "2007-03-21T20:57:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_Robert\_James](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@S\_Robert\_James](https://discuss.rubyonrails.org/u/S_Robert_James)\
**Post date:** [March 21, 2007, 8:57pm UTC](https://discuss.rubyonrails.org/t/eager-loading-with-custom-finder-sql/10596/1 "2007-03-21T20:57:42Z")

</div>

Is there any way to do eager loading when using custom :finder\_sql ?

---

<div class="post-metadata">

**Author:** ![Mark\_James](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mark\_James](https://discuss.rubyonrails.org/u/Mark_James)\
**Post date:** [March 22, 2007, 12:41pm UTC](https://discuss.rubyonrails.org/t/eager-loading-with-custom-finder-sql/10596/2 "2007-03-22T12:41:30Z")

</div>

S. Robert James wrote:

> Is there any way to do eager loading when using custom :finder\_sql ?

Yes, put this file in lib: [http://mrj.bpa.nu/eager\_custom\_sql.rb](http://mrj.bpa.nu/eager_custom_sql.rb)
