]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't populate expired attrs w/ evaluator
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 21 Oct 2020 17:58:22 +0000 (13:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 21 Oct 2020 18:08:49 +0000 (14:08 -0400)
commit51ab4430fb34e9e4dbaa1d4457339c059fdaf9b1
tree6240b485d5cacec99e6ba7f2bb33d5d338512fe8
parent8132ddd8f8fe61c45f67fe7c96419faacb955c85
Don't populate expired attrs w/ evaluator

Fixed bug in :meth:`_orm.Query.update` where objects in the
:class:`_orm.Session` that were already expired would be unnecessarily
SELECTed individually when they were refreshed by the "evaluate"
synchronize strategy.

For 1.4 there was also a similar issue with fetch that would actually
get the wrong data back, as the new value would be loaded, then
applied with the evaluator.

Fixes: #5664
Change-Id: I6e6aff88462654fcefa9fce2b45f5446c418deee
(cherry picked from commit e3dc20ff27fa75e571fb2631e64737ea8f25f7c5)
doc/build/changelog/unreleased_13/5664.rst [new file with mode: 0644]
lib/sqlalchemy/orm/persistence.py
test/orm/test_update_delete.py