[sqlalchemy] Re: How to identify a transaction that has already begun

2009-01-03 Thread Jaimy Azle
On Saturday, January 3, 2009, 12:04:54 AM, Michael Bayer wrote: session = sqlalchemy.orm.scoped_session( sqlalchemy.orm.sessionmaker( autoflush=False, autocommit=False ) ) session has an is_active flag

[sqlalchemy] Re: How to identify a transaction that has already begun

2009-01-03 Thread Michael Bayer
On Jan 3, 2009, at 4:55 AM, Jaimy Azle wrote: On Saturday, January 3, 2009, 12:04:54 AM, Michael Bayer wrote: session = sqlalchemy.orm.scoped_session( sqlalchemy.orm.sessionmaker( autoflush=False, autocommit=False )

[sqlalchemy] Re: How to identify a transaction that has already begun

2009-01-02 Thread Michael Bayer
session has an is_active flag which indicates this, but if you are using autocommit=False, the Session is always within a transaction and you should never call begin(). On Jan 1, 2009, at 11:52 PM, Jaimy Azle wrote: Hi All, I configure a session (from elixir) using this code: