Hey Jeremy,
I wanted to use eager or eager_graph to easily fetch and cache a non-
predefined association. The thing I want to speed up is this:
Post.each do |post|
post.comments.filter(:user_id => params[:id]).first
end
As you can see, I need to filter and limit the associated table
dynamically (against some argument, in this case params[:id]).
I feel like there would be something to the effect of:
Post.eager_graph(:comments).eager_filter(:user_id => params
[:id]).eager_limit(1)
but I can't find it.
Can you help me with this?
--David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---