On 9 Mar 2009, at 17:48, Mario Flores wrote:
>
> Is there a way to limit eager loading? I want to feature categories,
> each with three Items from that category. Is there anyway to do that
> with eager loading or would you recommend a different method?
>
Not unless you can express that limit as an sql condition.
fundamentally eager loading can''t do limits on the number of child
records retrieved (at least not without doing it the dumb way ie
loading all associated records and then using ruby to throw away the
extra ones).
Fred
> Thanks!
>
> -Mario
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---