Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-09-01 10:51 GMT+02:00 David Espada : > I have tested and it doesn't wotk :( > Ouch! Now I understand that your example is not generic code, but a redefinition of specific association code. Sorry :) -- David -- You received this message because you are subscribed to the

Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-09-01 10:34 GMT+02:00 David Espada : > > 2016-08-31 18:40 GMT+02:00 Jeremy Evans : > >> plugin :instance_hooks >> >> def association=(v) >> after_save_hook{super} >> end >> > > I'll try it. Thank you very much. > I have tested and it

Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-08-31 18:40 GMT+02:00 Jeremy Evans : > 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 >

Re: "delay_add_association" plugin and one_to_one relationship

2016-08-31 Thread Jeremy Evans
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 : > >> 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

Re: "delay_add_association" plugin and one_to_one relationship

2016-08-31 Thread Jeremy Evans
On Wednesday, August 31, 2016 at 4:36:40 AM UTC-7, David Espada wrote: > > Hi all. > > There is a good little Sequel plugin called "delay_add_association" that > avoids persistence when adding a child (one_to_many) to an entity. That is > good in my > system, because I like to have a consistent

"delay_add_association" plugin and one_to_one relationship

2016-08-31 Thread David Espada
Hi all. There is a good little Sequel plugin called "delay_add_association" that avoids persistence when adding a child (one_to_many) to an entity. That is good in my system, because I like to have a consistent object representation without persisting nothing until the end of the work cycle. But