Azure / azure-sdk-for-sap-odata

This repository serves as foundation to power SAP OData SDK development for .NET
MIT License
7 stars 3 forks source link

[BUG] OData $filter with dictionary handles multiple entries wrong [ old repo #17] #12

Closed WillEastbury closed 1 year ago

WillEastbury commented 1 year ago

Is there an existing issue for this?

Type of issue

bug

Describe the bug

OData $filter with dictionary handles multiple entries wrong

Expected Behavior

Implementation for requests like:

var selectors = new Dictionary<string, object>(); selectors.Add("SalesOrderID", "0500000000"); selectors.Add("ItemPosition", "0000000010"); var salesOrderLineItem = await sos.GetAsync(selectors);

produces: /sap/opu/odata/iwbep/GWSAMPLE_BASIC/SalesOrderLineItemSet?$filter=SalesOrderID eq '0500000000' ItemPosition eq '0000000010'

instead of: /sap/opu/odata/iwbep/GWSAMPLE_BASIC/SalesOrderLineItemSet?$filter=SalesOrderID eq '0500000000' and ItemPosition eq '0000000010'

adding FilterConjunctionOperator.and in ODataOperationsDispatcher produces: /sap/opu/odata/iwbep/GWSAMPLE_BASIC/SalesOrderLineItemSet?$filter=SalesOrderID eq '0500000000' and ItemPosition eq '0000000010' and

Steps To Reproduce

No response

Add screenshots to help explain your problem

No response

Additional context

No response