Re: [sqlalchemy] Update instead of delete on collection

2014-07-15 Thread Michael Bayer
On Jul 15, 2014, at 1:56 PM, Mariano Mara wrote: > > But actually I don't want to lose track of the relation between parent and > child. Of course, the easiest solution would be to perform the update in the > ORM step but I have to use a common class to handle all ORM actions and I > have to

Re: [sqlalchemy] Update instead of delete on collection

2014-07-15 Thread Mariano Mara
2014-07-15 14:47 GMT-03:00 Michael Bayer : > > On Jul 15, 2014, at 1:27 PM, Mariano Mara wrote: > > > Hi all > > > > Each time my Parent class is edited and one of the elements from its > Child relationship is removed I want to "invalidate" this element (e.g. > element.valid=False) instead of act

Re: [sqlalchemy] Update instead of delete on collection

2014-07-15 Thread Michael Bayer
On Jul 15, 2014, at 1:27 PM, Mariano Mara wrote: > Hi all > > Each time my Parent class is edited and one of the elements from its Child > relationship is removed I want to "invalidate" this element (e.g. > element.valid=False) instead of actually performing the delete DML > instruction. How

[sqlalchemy] Update instead of delete on collection

2014-07-15 Thread Mariano Mara
Hi all Each time my Parent class is edited and one of the elements from its Child relationship is removed I want to "invalidate" this element (e.g. element.valid=False) instead of actually performing the delete DML instruction. How can I achieve that? I have created a "remove" event listener and