-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
DefaultQuerySqlGenerator.VisitPropertyParameter bug allows duplicate parameters #14645
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
Comments
I think there's a bigger problem here in that the InvariantName is used as a Key to the parameterValues dictionary in |
This was referenced Jun 10, 2019
roji
added a commit
to roji/efcore
that referenced
this issue
Jul 9, 2019
Entity equality introduces member access expressions on what may be a parameter or a constant. Identify these cases and generate a new parameter (for access of a parameter) or evaluate the constant. Fixes dotnet#15855 Fixes dotnet#14645 Fixes dotnet#14644
Note: moved this to the 3.0.0 milestone. |
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Jul 25, 2019
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.
customer-reported
type-bug
DefaultQuerySqlGenerator.VisitPropertyParameter
attempts to avoid duplicates by comparingInvariantName
with propertyParameterExpression.PropertyParameterName, but adds new parameters using propertyParameterExpression.Name forInvariantName
:You can reproduce by making a slight modification to the Where clause of the SimpleQueryTestBase.Where_poco_closure() test case:
Even though the modification is pointless, it's valid syntax and it generates valid CommandText. But when executed against SqlServer EFCore provider, this test throws the following SqlException:
The text was updated successfully, but these errors were encountered: