On Tuesday, June 9, 2015 at 9:57:35 AM UTC-7, binarypaladin wrote:
>
> Hey. I don't know if this is a bug or something that has been omitted for
> technical reasons, but if I use association_join on an association that
> takes a block parameter, the block is ignored.
>
This is expected, and a result of the fact that
association_join/eager_graph support multiple/cascaded associations. It
would be impossible to know to which association the block is related.
Sequel supports per-association association_join/eager_graph callbacks via:
Club.association_join(:members=>proc{|ds| ds.with_active_membership})
It's even possible to use these with cascading joins:
Club.association_join(:members=>{proc{|ds|
ds.with_active_membership}=>:clubs})
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.