]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Narrow refresh populate_existing to just refresh_state
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 20 Apr 2021 15:33:02 +0000 (11:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 20 Apr 2021 15:33:48 +0000 (11:33 -0400)
commit033e673f8771dfb20dd7b67a780c6ef3d3210e37
tree988c3f65aa249a0ae9d541e5a44d84444ba88e6c
parenta58c99977eafc5f69a3e37f9ddcc328698e7fe1e
Narrow refresh populate_existing to just refresh_state

Fixed additional regression caused by the "eagerloaders on refresh" feature
added in :ticket:`1763` where the refresh operation historically would set
``populate_existing``, which given the new feature now overwrites pending
changes on eagerly loaded objects when autoflush is false. The
populate_existing flag has been turned off for this case and a more
specific method used to ensure the correct attributes refreshed.

Fixes: #6326
Change-Id: I40315e4164eae28972c5839c04580d292bc6cb24
doc/build/changelog/unreleased_14/6326.rst [new file with mode: 0644]
lib/sqlalchemy/orm/loading.py
test/orm/test_expire.py