]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't expire "deferred" attributes in make_transient_to_detached
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Sep 2017 19:33:04 +0000 (15:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Sep 2017 19:33:04 +0000 (15:33 -0400)
commit5abb036e9b9eba0f61cf9617dea2d879c2d5b09c
treec800de05cebaa5641a37f8bb1381fbfb58c34504
parentac1c19dee7d5ac784a7c913b1555f58d9cd4ec80
Don't expire "deferred" attributes in make_transient_to_detached

Fixed issue where the :func:`.make_transient_to_detached` function
would expire all attributes on the target object, including "deferred"
attributes, which has the effect of the attribute being undeferred
for the next refesh, causing an unexpected load of the attribute.

Change-Id: I82a385e3033e3f3c31569b1e908efb5f258d0f27
Fixes: #4084
doc/build/changelog/unreleased_12/4084.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/state.py
test/orm/test_expire.py