[sqlalchemy] Re: flush and transactions, doesn't roll back

2007-06-28 Thread mc
Thanks, that was it. On Jun 25, 5:25 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Jun 25, 2007, at 4:09 AM, mc wrote: > > > > > > > I have the following piece of code: > > > transaction = session.create_transaction() > > try: > > # Do some work here that might fail > > p=P() > > p.ID=333 > >

[sqlalchemy] Re: flush and transactions, doesn't roll back

2007-06-25 Thread Michael Bayer
On Jun 25, 2007, at 4:09 AM, mc wrote: > > I have the following piece of code: > > transaction = session.create_transaction() > try: > # Do some work here that might fail > p=P() > p.ID=333 > session.save(p) > session.flush() > # Do some more work here that might fail > p1=P() > p1.ID=333 > sess