[sqlalchemy] Load parent on child deletion

2012-03-21 Thread Pau Tallada
Hi! I have a model with a parent-child relationship on the same entity. The children collection on a parent instance has events set to intercept adding and removing instances to/from it. This is needed to update an attribute from the parent instance. But when I delete an instance which is the

Re: [sqlalchemy] Load parent on child deletion

2012-03-21 Thread Michael Bayer
On Mar 21, 2012, at 5:18 AM, Pau Tallada wrote: Hi! I have a model with a parent-child relationship on the same entity. The children collection on a parent instance has events set to intercept adding and removing instances to/from it. This is needed to update an attribute from the

Re: [sqlalchemy] Load parent on child deletion

2012-03-21 Thread Pau Tallada
Yes, I meant that :P I'll try with the before_flush_event. Thanks!! 2012/3/21 Michael Bayer mike...@zzzcomputing.com On Mar 21, 2012, at 5:18 AM, Pau Tallada wrote: Hi! I have a model with a parent-child relationship on the same entity. The children collection on a parent instance has