From: Mike Bayer Date: Mon, 10 Jul 2006 23:05:03 +0000 (+0000) Subject: expunge wasnt de-associating the object with a session X-Git-Tag: rel_0_2_6~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1b164df9ff1399c8c39c39d5053d3c9c1e48ba7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git expunge wasnt de-associating the object with a session --- diff --git a/CHANGES b/CHANGES index 16e6a05d4d..ffc2e51864 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ of subclassed directly. - activemapper will use threadlocal's objectstore if the mod is activated when activemapper is imported - small fix to URL regexp to allow filenames with '@' in them +- fixes to Session expunge/update/etc. 0.2.5 - fixed endless loop bug in select_by(), if the traversal hit diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 5bed7181cc..82e1c6d6de 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -266,6 +266,7 @@ class Session(object): def expunge(self, object): """removes the given object from this Session. this will free all internal references to the object.""" self.uow.expunge(object) + self._unattach(object) def save(self, object, entity_name=None): """