]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
don't mutate the statement in ORM compile
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 00:44:46 +0000 (20:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 02:18:01 +0000 (22:18 -0400)
commit7fdaac7b2910b5612420378519b9f60d4649daff
tree7d3f72c3c88aaaa8d54affd1f3ac3f9bd55cc00f
parent2af1b107fce34b15898e6f534097ad34cfd7d503
don't mutate the statement in ORM compile

Fixed issue where using a :class:`_sql.Select` as a subquery in an ORM
context would modify the :class:`_sql.Select` in place to disable
eagerloads on that object, which would then cause that same
:class:`_sql.Select` to not eagerload if it were then re-used in a
top-level execution context.

Fixes: #6378
Change-Id: I945048c4c148587b933fb65a3fc83a05d05c052d
doc/build/changelog/unreleased_14/6378.rst [new file with mode: 0644]
lib/sqlalchemy/orm/context.py
test/orm/test_eager_relations.py