On Saturday, April 29, 2017 at 12:37:33 AM UTC-7, dota? =op wrote:
>
> i have something liek this: 
>
> class Stuff < Sequel::Model 
>   one_to_many( 
>     :some_other_magic_stuffs, 
>     class: :SomeOtherStuffs, 
>     graph_block: proc do |j, lj, js| 
>       S(j)[:created_at] < S(lj)[:magic_time] 
>     end 
>   ) 
> end 
>
> which gives nice joins. 
>
> but i also want it to work as a instance method, so i go ahead and try 
> to add a `conditions` option, but it doesnt know about instance stuff 
> liek `magic_time`, but then i try to add a block and it kinda works, 
> but then it breaks teh associations_dataset because it doesnt know 
> about instance stuff. 
>
> i also tried `association_datasets_join: true`, but it didnt help. 
>
> wat should i do now? =o( 


I'm not sure exactly what you want. My guess is you either want to pass a 
block to one_to_many, or to use the :dataset option  Can you please provide 
a minimal self contained example, as well as the SQL you want to generate?

In terms of the dataset_associations plugin (mentioned in the subject of 
your post but not the body), that cannot support instance specific 
associations.  Eager loading via eager cannot support instance specific 
associations either.  

association_datasets_join option doesn't appear to be used anywhere in 
Sequel.

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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to