]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Omit onclause as source of FROMs from a Join
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 8 Oct 2019 20:42:21 +0000 (16:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Oct 2019 15:05:58 +0000 (11:05 -0400)
commit105810c92123c74b0066ef01db5d1696932800c6
treeeb445a962c83cfbfb30026d246398064ba8f9eaf
parentcab08ea1834ac519f124789b835afa6832972b1c
Omit onclause as source of FROMs from a Join

The :class:`.Join` construct no longer considers the "onclause" as a source
of additional FROM objects to be omitted from the FROM list of an enclosing
:class:`.Select` object as standalone FROM objects. This applies to an ON
clause that includes a reference to another  FROM object outside the JOIN;
while this is usually not correct from a SQL perspective, it's also
incorrect for it to be omitted, and the behavioral change makes the
:class:`.Select` / :class:`.Join` behave a bit more intuitively.

Fixes: #4621
Change-Id: Iaa1e75b7c59b21e9701ab3c9b69e66930feaf8ee
doc/build/changelog/unreleased_14/4621.rst [new file with mode: 0644]
lib/sqlalchemy/sql/selectable.py
test/sql/test_selectable.py