Re: [sqlalchemy] How to not losing changes on rollback?

2013-09-25 Thread Michael Bayer
On Sep 25, 2013, at 12:23 PM, Julio César Gázquez wrote: > Hi. > > I'd like to know what's the recommended approach to keep the state of the > session and the associated objects when session.flush() fails, in order to > being able to fix the cause of the problem and retry the operation. > >

[sqlalchemy] How to not losing changes on rollback?

2013-09-25 Thread Julio César Gázquez
Hi. I'd like to know what's the recommended approach to keep the state of the session and the associated objects when session.flush() fails, in order to being able to fix the cause of the problem and retry the operation. For cases with a single object hierarchy, I think using session.merge()