Limit Eager Loading?

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?

Thanks!

-Mario

On 9 Mar 2009, at 17:48, Mario F. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs