On Friday, August 15, 2014 5:45:20 AM UTC-7, Patrick Kuykendall wrote:
>
> Jeremy,
>
> Thanks for the quick response. I went with the second option you 
> suggested, and it works great for updating records directly. But, I do have 
> a follow-up question.
>
> If I have two models associated to each other in a one_to_one 
> relationship, and I make a call like:
>
> model_a.model_b = ModelB.new(params)
>
>
> There is a query that is generated on ModelB's table to null out the FK's 
> on all other records, which is great, but it doesn't seem to honor the 
> _update_dataset override.
>
> Am I attacking this in the wrong way, or is there another method I could 
> override?
>

A :setter association option for writing your own setter code may work. 
 But this is where the dataset level fix may work better, since it will 
unalias any table used in an update statement.

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.

Reply via email to