-
Notifications
You must be signed in to change notification settings - Fork 475
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
issue while filtering on dynamic string property with tolower() function - Microsoft.AspNetCore.Odata -7.4.0 #2173
Comments
@sandeepagrawal921 Kindly share your $filter query/expression or something close enough to your actual scenario that can provide us a good view of what you're working with. I'm not sure I understand what you mean by this statement: "filter on the dictionary key" Kindly provide us with sufficient details in the Reproduce steps that we can use to recreate the issue you're facing |
Hi @gathogojr , FYI - here is the sample query - Here tolower() works on Instrument/ISS_TYP as this is not a dynamic property. even dynamic property filter on decimal field - ESGScores/MSCI_ESG__Social__WeightedScore also works fine. Hope I am clear with my query, please let me know if still any confusion. |
@sandeepagrawal921 Is ESGScores/MSCI_ESG__Social__ScoreAssessmentCategory eq cast('average', #NS#.#EnumType#) Otherwise for the case of a dynamic property of type We'll need to investigate and fix the issue. |
Hi @gathogojr , I appreciate your quick response. thank a lot. |
@gathogojr one more quick query is, to apply filter on decimal fields do we need to append M in decimal field filter value always? Thanks |
We are facing the same issue when applying tolower function on dynamic property in filter condition. Any ETA for this bug fix? |
same issue is still valid when filtering dynamic properties. Do you have any estimation time about fixing that issue? |
Same issue here with a Dictionary<string, string> property. Any idea on a possible fix/workaround? Im using the |
Fixed in Microsoft.AspNetCore.OData 8.0.11 via update of Microsoft.OData.Core 7.12.2 dependency - PR OData/odata.net#2257 |
issue while filtering on dynamic string property with tolower() function
Assemblies affected
*Microsoft.AspNetCore.Odata -7.4.0
Steps to reproduce -
Expected result
Result data should filter as per expectation
Actual result
*throwing error as -
"error": {
"code": "",
"message": "The query specified in the URI is not valid. The 'tolower' function cannot be applied to an enumeration-typed argument.",
"details": [],
"innererror": {
"message": "The 'tolower' function cannot be applied to an enumeration-typed argument.",
"type": "Microsoft.OData.ODataException",
"stacktrace": " at Microsoft.AspNet.OData.Query.Expressions.ExpressionBinderBase.ValidateAllStringArguments(String functionName, Expression[] arguments)\r\n at Microsoft.AspNet.OData.Query.Expressions.ExpressionBinderBase.BindToLower(SingleValueFunctionCallNode node)\r\n at
*
Additional detail
Optional, details of the root cause if known. Delete this section if you have no additional details to add.
The text was updated successfully, but these errors were encountered: