]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Disable eager loads for exists()
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Dec 2017 21:22:31 +0000 (16:22 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Dec 2017 21:23:44 +0000 (16:23 -0500)
commit1cbaff643f8d524fc0f7b347f659d18a67884f16
treeb3110534200aaea11e16e3e230783f1e76116ada
parent76b5981b41618048c4c593bbd9062c34ddc1fa36
Disable eager loads for exists()

The :meth:`.Query.exists` method will now disable eager loaders for when
the query is rendered.  Previously, joined-eager load joins would be rendered
unnecessarily as well as subquery eager load queries would be needlessly
generated.   The new behavior matches that of the :meth:`.Query.subquery`
method.

Fixes: #4032
Change-Id: Iacafc76aa9ae0b71928037fa9637e85ad434ee3a
doc/build/changelog/unreleased_12/4032.rst [new file with mode: 0644]
lib/sqlalchemy/orm/query.py
test/orm/test_query.py