On Wednesday, August 31, 2016 at 7:50:48 AM UTC-7, David Espada wrote:
>
> 2016-08-31 16:00 GMT+02:00 Jeremy Evans <jeremyeva...@gmail.com>:
>
>> I suppose that is something I would consider as an addition to 
>> delay_add_association.  Do you want to work on a pull request for it?
>>
>> I have seen lightly the code and... it frightens me a little, but can try 
> it :)
>
> What I wish is having changed behaviour in all cases, when entity is new 
> and when is not. If you assign a related entity in ANY case, persistence  
> and linking is delayed until main (root) entity is persisted. What do you 
> think of that option?
>

That's certainly not the behavior of delay_add_association in the *_many 
association case, so it wouldn't make sense for it to be the default in the 
one_to_one case.  If you want that behavior, you can probably write your 
only plugin, or just do:

  plugin :instance_hooks

  def association=(v)
     after_save_hook{super}
  end 

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 sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
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