-
Notifications
You must be signed in to change notification settings - Fork 352
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
FilterExpression contains ConvertNode when using decimal with precision #654
Comments
Sorry, but I don't quite get your idea. Do you mean that the library should convert the decimal constant instead of the property, or the |
The convertnode should not exist at all (in my opinion) and the constantnode should have the same datatype (decimal with precision 6 and scale 2) as the SingleValuePropertyAccess node. That would make the tree easier to use and it would match the behavior when using other datatypes (if I use strings there isn't a convertnode and if I use decimal without scale there isn't a convertnode either) |
Following is my thought on this:
Does this make sense? |
It does make sense but I do have a question about Given the above model with this url: |
According to what I have gathered, I'm afraid that, in the current V4 standard, there is no way to specify precision/scale for decimal literals in URLs. Rule
and
I see no place for specifying precision/scale in the |
Hi @DickvdBrink. I've discussed this issue with several experienced team members, and here are the results:
|
Thanks for this! :) Will check this out when I have the time. |
Assemblies affected
OData .Net lib 6.15
Reproduce steps
See image below, I didn't expect the convertnode or at least I would have thougt the types of the constant to match the one from the id column.
If I use the code with
GetDecimal(true);
and change the 4.2 to an int (id eq 1
) it promotes the constant to a decimal. I would have expected the same for the decimal with precision caseThe text was updated successfully, but these errors were encountered: