]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix adaption in AnnotatedLabel; repair needless expense in coercion
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 May 2021 12:29:24 +0000 (08:29 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 May 2021 14:35:51 +0000 (10:35 -0400)
commit460bed7cfd8a6dd035caff5f5b1b33edf96fa3bb
treef693d05af509b210fe64255459b73bb425bb054e
parentaaba0650d7410f579b2c14f8f1b0680a1d1852c4
Fix adaption in AnnotatedLabel; repair needless expense in coercion

Fixed regression involving clause adaption of labeled ORM compound
elements, such as single-table inheritance discriminator expressions with
conditionals or CASE expressions, which could cause aliased expressions
such as those used in ORM join / joinedload operations to not be adapted
correctly, such as referring to the wrong table in the ON clause in a join.

This change also improves a performance bump that was located within the
process of invoking :meth:`_sql.Select.join` given an ORM attribute
as a target.

Fixes: #6550
Change-Id: I98906476f0cce6f41ea00b77c789baa818e9d167
doc/build/changelog/unreleased_14/6550.rst [new file with mode: 0644]
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/traversals.py
test/aaa_profiling/test_orm.py
test/profiles.txt
test/sql/test_external_traversal.py