From 359f471a1203cafd5dc99b5b078ba7d788b67cec Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 2 Apr 2015 12:19:15 -0400 Subject: - Fixed bug where the state tracking within multiple, nested :meth:`.Session.begin_nested` operations would fail to propagate the "dirty" flag for an object that had been updated within the inner savepoint, such that if the enclosing savepoint were rolled back, the object would not be part of the state that was expired and therefore reverted to its database state. fixes #3352 --- lib/sqlalchemy/orm/session.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqlalchemy/orm') diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index f3ad2349c..4619027e5 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -305,6 +305,7 @@ class SessionTransaction(object): self._deleted.clear() elif self.nested: self._parent._new.update(self._new) + self._parent._dirty.update(self._dirty) self._parent._deleted.update(self._deleted) self._parent._key_switches.update(self._key_switches) -- cgit v1.2.1