]> 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 21:27:41 +0000 (16:27 -0500)
commit5c7754d685df3715da76327c7401e99177611daf
tree73f6fc69d4afbf3ef3fff96a2517949ea490f5e9
parentbbe754784ae4630dd0ebf30d3bc2be566f8a8fef
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
doc/build/changelog/unreleased_13/4974.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
test/orm/test_relationships.py