]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Exclude local columns when adapting secondary in a join condition
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 10 Nov 2019 20:42:40 +0000 (15:42 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 10 Nov 2019 20:45:04 +0000 (15:45 -0500)
commit7062311ce8da5508a254f51be6922e6b065f28d2
treec58baf1fb2b28e54cbd2def8f4e8e77ed609cfae
parent342869430473d084f026164aa485cc3d81cefef6
Exclude local columns when adapting secondary in a join condition

Fixed ORM bug where a "secondary" table that referred to a selectable which
in some way would refer to the local primary table would apply aliasing to
both sides of the join condition when a relationship-related join, either
via :meth:`.Query.join` or by :func:`.joinedload`, were generated.  The
"local" side is now excluded.

Fixes: #4974
Change-Id: Ia43da747c22141b05439f4511ddeceb10248582e
(cherry picked from commit f3bfe0881726f1b3075400346f5987390ebe6c19)
doc/build/changelog/unreleased_13/4974.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
test/orm/test_relationships.py