Repository navigation
in operator not working with null Guid values - #2035
ElizabethOkerio merged 3 commits into
Conversation
4993a15 to
9362cb6
Compare
|
Could you add test cases for this? |
|
Please add tests |
5846cb8 to
c3500d9
Compare
gathogojr
left a comment
There was a problem hiding this comment.
Looks good to me but I have to wonder if the issue could have been resolved by changing this:
if (items[i][0] != '\'' && items[i][0] != '"')to
if (items[i] != "null" && items[i][0] != '\'' && items[i][0] != '"')Kindly confirm if that would do the job
We still need the else part: if (items[i] != "null" && items[i][0] != '\'' && items[i][0] != '"')
{
}
else if(items[i] == "null")
{
} Because we need to assign the items[i]. And for the check we have to specify that it is a null coz it could be anything else that does not meet the first criteria. |
Maybe I don't understand, but why would we need the else part? Assigning |
Yes I get |
8272d5d to
2ffa3b7
Compare
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Issues
This pull request fixes issue #1997 .
Description
Briefly describe the changes of this pull request.
For a sample model like the one shown below
Running the following sample query throws an error.
It is also been clear that a null GUID should not be equated to an empty GUID.
http://host/service/TestEntity?$filter=NullableProperty in (null)Guid literals are converted to single-quoted form, so that they are compatible with the Json reader used for deserialization.
This means that even null GUIDS will be converted to the single quoted form which will later lead to them being processed as null strings. ("null").
This fix ensures that null GUIDs are not converted to the single-quoted form and are processed as null values.
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.