Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable_eagerloads(False) automatically for .subquery(), .exists() #4032

Closed
sqlalchemy-bot opened this issue Jul 18, 2017 · 2 comments
Closed
Labels
bug Something isn't working orm
Milestone

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Michael Bayer (@zzzeek)

calling .exists() on an entity that has a subqueryload set up raises an error in 1.1 due to the internals not handling it correctly. There should be no reason eagerloads are called upon at all for an exists() and probably for .subquery() in general.

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

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

1cbaff6

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working orm
Projects
None yet
Development

No branches or pull requests

1 participant