]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add Executable traverse internals to Executable subclasses and turn tests on
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Oct 2025 18:55:44 +0000 (14:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 8 Oct 2025 12:47:42 +0000 (08:47 -0400)
commit33262f366e4a201b1453b9ebd37a7ff992f97f27
tree4f1264de79e97b7dd05abc0bb2c5312652acf1ef
parentd0a36fbe37ec97d83a18d915bcb6c0a6215afe5a
Add Executable traverse internals to Executable subclasses and turn tests on

Fixed a caching issue where :func:`_orm.with_loader_criteria` would
incorrectly reuse cached bound parameter values when used with
:class:`_sql.CompoundSelect` constructs such as :func:`_sql.union`. The
issue was caused by the cache key for compound selects not including the
execution options that are part of the :class:`_sql.Executable` base class,
which :func:`_orm.with_loader_criteria` uses to apply its criteria
dynamically. The fix ensures that compound selects and other executable
constructs properly include execution options in their cache key traversal.

Fixes: #12905
Change-Id: I24bbd96233cddabe42eb716f078eea4c84b1af05
(cherry picked from commit 148059ced691da5edf3504a1d999cb1ab638dc7b)
doc/build/changelog/unreleased_20/12905.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/selectable.py
test/sql/test_compare.py