From a88e4c9a2b6a268afbfb1c70ba5bcca58393409d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 12 Sep 2006 20:06:42 +0000 Subject: - fixed bug where Connection wouldnt lose its Transaction after commit/rollback --- lib/sqlalchemy/engine/base.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index ce6cc7d82..fad84eef8 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -211,10 +211,12 @@ class Connection(Connectable): if self.__engine.echo: self.__engine.log("ROLLBACK") self.__engine.dialect.do_rollback(self.connection) + self.__transaction = None def _commit_impl(self): if self.__engine.echo: self.__engine.log("COMMIT") self.__engine.dialect.do_commit(self.connection) + self.__transaction = None def _autocommit(self, statement): """when no Transaction is present, this is called after executions to provide "autocommit" behavior.""" # TODO: have the dialect determine if autocommit can be set on the connection directly without this -- cgit v1.2.1