Hi Hendrik,
Unless something has changed since I last looked at it, eager loaded
associations are pulled in with a single select.
So if you think about it, AR can''t build the "from" portion
of the
select until *after* it''s read the resultset to see what tables the
polymorphic associations belong to.
Regards,
Trevor
--
Trevor Squires
http://somethinglearned.com
On 31-Mar-06, at 9:15 AM, Hendrik Mans wrote:
> Polymorphic associations work great until I try to do some eager
> loading through :include. In my example, the interface name is
> ":imagehaver". Here''s my little eagerly loading find
line:
>
> Image.find(params[:id], :include => :imagehaver)
>
> All it gives me is an ActiveRecord::EagerLoadPolymorphicError with no
> further explanation. I haven''t been able to dig up anything useful
> through Google, so I''m worried (or hoping?) that it could just be
my
> code. Any ideas?
>
> Cheers.
>
> --
> http://www.mans.de
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails