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
Query: DbSet may not be EntityQueryable #11043
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Comments
smitpatel
added a commit
that referenced
this issue
Feb 23, 2018
Issue: A linq query starting from DbSet always has EntityQueryable. But for a manually created query incorrectly passes Constant(IQueryable) rather than IQueryable.Expression then we try to parametrize it and cause multiple running queries. The fix is to not funcletize it. The Constant(DbSet) gets converted to EntityQueryable during ReLinq query parsing. This is a negative case. The query is malformed. We would leak context instance in this case. Since it is hot path, we are not going to add overhead for all other cases. Resolves #11043
smitpatel
added a commit
that referenced
this issue
Feb 23, 2018
Issue: A linq query starting from DbSet always has EntityQueryable. But for a manually created query incorrectly passes Constant(IQueryable) rather than IQueryable.Expression then we try to parametrize it and cause multiple running queries. The fix is to not funcletize it. The Constant(DbSet) gets converted to EntityQueryable during ReLinq query parsing. This is a negative case. The query is malformed. We would leak context instance in this case. Since it is hot path, we are not going to add overhead for all other cases. Resolves #11043
smitpatel
added a commit
that referenced
this issue
Feb 23, 2018
Issue: A linq query starting from DbSet always has EntityQueryable. But for a manually created query incorrectly passes Constant(IQueryable) rather than IQueryable.Expression then we try to parametrize it and cause multiple running queries. The fix is to not funcletize it. The Constant(DbSet) gets converted to EntityQueryable during ReLinq query parsing. This is a negative case. The query is malformed. We would leak context instance in this case. Since it is hot path, we are not going to add overhead for all other cases. Resolves #11043
smitpatel
added a commit
that referenced
this issue
Feb 23, 2018
Issue: A linq query starting from DbSet always has EntityQueryable. But for a manually created query incorrectly passes Constant(IQueryable) rather than IQueryable.Expression then we try to parametrize it and cause multiple running queries. The fix is to not funcletize it. The Constant(DbSet) gets converted to EntityQueryable during ReLinq query parsing. This is a negative case. The query is malformed. We would leak context instance in this case. Since it is hot path, we are not going to add overhead for all other cases. Resolves #11043
smitpatel
added a commit
that referenced
this issue
Feb 23, 2018
Issue: A linq query starting from DbSet always has EntityQueryable. But for a manually created query incorrectly passes Constant(IQueryable) rather than IQueryable.Expression then we try to parametrize it and cause multiple running queries. The fix is to not funcletize it. The Constant(DbSet) gets converted to EntityQueryable during ReLinq query parsing. This is a negative case. The query is malformed. We would leak context instance in this case. Since it is hot path, we are not going to add overhead for all other cases. Resolves #11043
smitpatel
added
type-bug
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
labels
Feb 23, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
In test
Here the ConstantExpression generated for
context.TestEntities
is not an EntityQueryable. WIth optimization going in #11030 we now try to parametrize all queryables which not EntityQueryable, which cause this test to fail with A second operation started error.After discussing with @ajcvickers
The text was updated successfully, but these errors were encountered: