On Thursday, May 28, 2020 at 10:09:55 AM UTC-7, Aryk Grosz wrote:
>
> Is there a way to change the condition so that it is not added to the 
> second join, but rather to the first on the "ON" condition? 
>

> I understand that putting it on the second always ensures that the 
> condition has the table referenced, but if you are doing something like a 
> left_join, it will change the result set. It did with me.
>
> A simple work around is to do:
>
> association_left_join(foo: :bar) instead of 
> association_left_join(:foo_bars), but I don't need the intermediary table.
>
> Not a huge deal, but curious if I was missing how to do that when defining 
> the association.
>

Assuming you are just talking about association_join/eager_graph of 
many_to_many/one_through_one associations, there is the 
:graph_join_table_conditions option (and other options starting with 
graph_join_table_).

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/7abb91b7-d041-4d1a-8bab-8e0269ad1a35%40googlegroups.com.

Reply via email to