]> 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>
Tue, 4 Jun 2024 21:26:28 +0000 (17:26 -0400)
commit9a74a282d0cb5a924322b9ad4b07e6196b55612a
tree6d790304206b61f60c7dfbc6f6f1f9eb65b4d592
parent6eda3cae02b0944bd5adb47145ca11404ec25f44
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
(cherry picked from commit c4c57237b76f3992a62c6eb5c23fd4e1919f1e4a)
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