Yep. That does a subselect instead of an inner join. Thanks!

Gonna take a while to really get a hold of everything that happens beneath 
the covers here.

On Wednesday, March 25, 2020 at 10:09:23 AM UTC-4, Jeremy Evans wrote:
>
> On Tuesday, March 24, 2020 at 3:59:21 PM UTC-7, John Devine wrote:
>>
>> I have two models, foo and bar which have many_to_many associations with 
>> each other.
>>
>> I would like to do 
>>
>> foo.bars_dataset.update(status: 'ready')
>>
>> but that throws: Sequel::Error (Need multiple FROM tables if 
>> updating/deleting a dataset with JOINs)
>>
>> Is there a simple way to update all the bars connected to my foo? 
>>
>
> Assuming you have a similar association on Bar:
>
>   Bar.where(:foos=>foo).update(...)
>
> 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/0827dd8a-ff6e-4379-b8f0-1854e2fca7de%40googlegroups.com.

Reply via email to