Closed WanjohiSammy closed 1 month ago
// left operand with fully qualified namespace /Employees?$filter=Fully.Qualified.Namespace'Monday' in WorkingDays
// left operand without fully qualified namespace /Employees?$filter='Monday' in WorkingDays
// left operand with integral value in single quotes /Employees?$filter='1' in WorkingDays
// left operand with integral value without single quotes /Employees?$filter=1 in WorkingDays
From the issue description, the first and last scenarios are currently supported..is that true? What this PR is supporting is the second and third scenario?
// left operand with fully qualified namespace /Employees?$filter=Fully.Qualified.Namespace'Monday' in WorkingDays
// left operand without fully qualified namespace /Employees?$filter='Monday' in WorkingDays
// left operand with integral value in single quotes /Employees?$filter='1' in WorkingDays
// left operand with integral value without single quotes /Employees?$filter=1 in WorkingDays
From the issue description, the first and last scenarios are currently supported..is that true? What this PR is supporting is the second and third scenario?
@ElizabethOkerio Currently, we are supporting only the 1st scenario. This PR is to support 2nd, 3rd and 4th
scenarios. I have edited the description.
Issues
This pull request fixes #2371.
Description
This change is to fix the issue raised where the
in
operator does not allow using astring
orinteger
literal as left operand when comparing against a collection of enums.The change involves:
left operand
is either anintegral
or astring
type and theright operand
is a collection of enums.MetadataBindingUtils.ConvertToTypeIfNeeded()
method to try convert the left operand to the same enum type if possible.Assume you have the following entity:
This change enables support of the following scenarios for
$filter
withIn
Operator: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.