]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add additional contextual path info when splicing eager joins
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 4 Jun 2024 14:56:26 +0000 (10:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 6 Jun 2024 21:06:07 +0000 (17:06 -0400)
commitd1394d9e05db647a7d4b116306274c99794f1186
treec22a0f29216664f2e7eff3fbfd13d5739965d8fa
parent6f704cac01a0b10e7c4531e20f8edd47f25c150f
add additional contextual path info when splicing eager joins

Fixed very old issue involving the :paramref:`_orm.joinedload.innerjoin`
parameter where making use of this parameter mixed into a query that also
included joined eager loads along a self-referential or other cyclical
relationship, along with complicating factors like inner joins added for
secondary tables and such, would have the chance of splicing a particular
inner join to the wrong part of the query.  Additional state has been added
to the internal method that does this splice to make a better decision as
to where splicing should proceed.

Fixes: #11449
Change-Id: Ie8f0e8d9bb7958baac33c7c2231e4afae15cf5b1
doc/build/changelog/unreleased_20/11449.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/util.py
test/orm/test_eager_relations.py