-
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
Json: updating property with conversion from string to other type fails on sql server #30330
Labels
area-json
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
Milestone
Comments
maumar
changed the title
Query/Json: updating property with conversion from string to other type fails on sql server
Json: updating property with conversion from string to other type fails on sql server
Feb 23, 2023
maumar
added a commit
that referenced
this issue
Mar 2, 2023
…o other type fails on sql server when producing update statement, when deciding whether we need CAST around the result of JSON_VALUE, we need to look if the property has converter, rather than just look at it's clr type. If the clr type is string, but it gets converted to int/bool etc we still need a CAST. Fixes #30330
maumar
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Mar 2, 2023
maumar
added a commit
that referenced
this issue
Mar 2, 2023
…o other type fails on sql server when producing update statement, when deciding whether we need CAST around the result of JSON_VALUE, we need to look if the property has converter, rather than just look at it's clr type. If the clr type is string, but it gets converted to int/bool etc we still need a CAST. Fixes #30330
maumar
added a commit
that referenced
this issue
Mar 2, 2023
…o other type fails on sql server when producing update statement, when deciding whether we need CAST around the result of JSON_VALUE, we need to look if the property has converter, rather than just look at it's clr type. If the clr type is string, but it gets converted to int/bool etc we still need a CAST. Fixes #30330
ghost
pushed a commit
that referenced
this issue
Mar 2, 2023
…o other type fails on sql server (#30380) when producing update statement, when deciding whether we need CAST around the result of JSON_VALUE, we need to look if the property has converter, rather than just look at it's clr type. If the clr type is string, but it gets converted to int/bool etc we still need a CAST. Fixes #30330
reopening for servicing given the #30598 customer report (relatively common scenario) |
maumar
added a commit
that referenced
this issue
Apr 3, 2023
…o other type fails on sql server When producing update statement, when deciding whether we need CAST around the result of JSON_VALUE, we need to look if the property has converter, rather than just look at it's clr type. If the clr type is string, but it gets converted to int/bool etc we still need a CAST. Fixes #30330
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-json
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
when updating a "normal" (non-string) property, we produce the following sql:
however if we update property that is string on client side but (say) bool on the server we issue the following:
i.e. we don't wrap the value in cast to a provider type, which then results in us storing it as string and causes problems when querying the values. We should look if the property has a converter and check provider type when determining if we need CAST or not.
The text was updated successfully, but these errors were encountered: