]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
run postfetch_post_update for version_id_col even if delete
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Feb 2024 21:06:28 +0000 (16:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Feb 2024 21:24:12 +0000 (16:24 -0500)
commit367e0e27a2e6930c66f2f98fbe477f9b1f06e2ca
treef7d1a9f5ae902357df8642bbb554b8de811c5203
parenta8dbf8763a8fa2ca53cc01033f06681a421bf60b
run postfetch_post_update for version_id_col even if delete

Fixed issue where using :meth:`_orm.Session.delete` along with the
:paramref:`_orm.Mapper.version_id_col` feature would fail to use the
correct version identifier in the case that an additional UPDATE were
emitted against the target object as a result of the use of
:paramref:`_orm.relationship.post_update` on the object.  The issue is
similar to :ticket:`10800` just fixed in version 2.0.25 for the case of
updates alone.

Fixes: #10967
Change-Id: I959e9a2cc3e750e86e8de7b12b28ee1e819ed6d8
doc/build/changelog/unreleased_20/10967.rst [new file with mode: 0644]
lib/sqlalchemy/orm/persistence.py
test/orm/test_versioning.py