]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
chain joins from SelectState context, not Select
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Jan 2021 22:06:14 +0000 (17:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Jan 2021 22:07:22 +0000 (17:07 -0500)
commitb6ff056b91834ec56f685c8735cd67c9b0603de7
treeb7f313f12c3cf756fa735d1547cddb712ddf585a
parent3df145c57c966e1511bccc117161563123ec6f0b
chain joins from SelectState context, not Select

Fixed issue in new :meth:`_sql.Select.join` method where chaining from the
current JOIN wasn't looking at the right state, causing an expression like
"FROM a JOIN b <onclause>, b JOIN c <onclause>" rather than
"FROM a JOIN b <onclause> JOIN c <onclause>".

Added :meth:`_sql.Select.outerjoin_from` method to complement
:meth:`_sql.Select.join_from`.

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