On Mon, Jun 21, 2021 at 10:30 AM Jeremy Evans <[email protected]>
wrote:

>
> Can you try to use the :dataset option and also use the key: nil option.
>

Yes!  That worked for the immediate issue where the non-existent method
based on a non-existent foreign key column was being called.

It took me a little longer to work out the eager and eager graphing options
for the association.  For eager graphing, I needed to add a :graph_block
option, which returns my custom join condition.  Crucially, I also needed
to supply :graph_only_conditions => nil, otherwise the join was "... ON
(other_tables.primary_key IS NULL) AND (my_custom_condition)...".  And for
eager loading, I needed an :eager_loader option with a proc that performed
the necessary query + setting of associations.

Thanks for the solution and super quick reply!

-- 
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/CAKY8D6EMK00aEmpSkefCJYNFLhXazFyPVpqxhOqzp-3kX%2B7vdw%40mail.gmail.com.

Reply via email to