[sqlalchemy] Re: session.autocommit, session.begin double SessionExtension call

2009-05-24 Thread Alessandro Dentella
On Sat, May 23, 2009 at 02:43:33PM -0400, Michael Bayer wrote: On May 23, 2009, at 10:15 AM, Alessandro Dentella wrote: Hi, when from my pygtk application i commit, I really do:: if self.session.autocommit: self.session.begin()

[sqlalchemy] Re: session.autocommit, session.begin double SessionExtension call

2009-05-24 Thread Michael Bayer
well the begin() in this case is doing a flush() of pending data to ensure that it starts clean - otherwise if you said rollback(), the state which to roll back to would not be determined.then since you have autocommit=True its issuing a COMMIT. so a COMMIT is happening and if you

[sqlalchemy] Re: session.autocommit, session.begin double SessionExtension call

2009-05-23 Thread Michael Bayer
On May 23, 2009, at 10:15 AM, Alessandro Dentella wrote: Hi, when from my pygtk application i commit, I really do:: if self.session.autocommit: self.session.begin() self.session.commit() I'm normally using session.autocommit = True as a mean to