Skip to content
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

Filter with lessOrEqual for String attributes does not work, bug or feature? #1903

Closed
thulium3 opened this issue Dec 16, 2021 · 2 comments
Closed
Assignees
Labels
feature request Requests for new functionality prio: medium

Comments

@thulium3
Copy link

We use a custom OData service that provides account numbers as String from an SAP S/4HANA backend.
When calling the service directly we can filter the result using account le '1234'. The filter works as expected.

In the generated OData clients from Cloud SDK the method lessOrEqual is not available (because it is not a numeric value I think). So as a workaround I have to execute a raw request.

Do you think the OData service is badly designed and it is working as expected that lessOrEqual is not available or should it be possible to use this filter also in the generated clients because in SAP fields like Account number or Order number are often stored as String?

@thulium3 thulium3 added the question Further information is requested label Dec 16, 2021
@jjtang1985
Copy link
Contributor

Hi @thulium3 ,

Thanks for reaching out.
The OData doc says:

The six comparison operators can be used with all primitive values except Edm.Binary, Edm.Stream, and the Edm.Geo types. Edm.Binary, Edm.Stream, and the Edm.Geo types can only be compared to the null value using the eq and ne operators.

I would say Edm.String should also be a valid type with lessOrEqual.

Unfortunately, the current SDK does not support it.
I'll create a ticket for this feature request. @artemkovalyov .

Best regards,
Junjie

@jjtang1985 jjtang1985 added feature request Requests for new functionality prio: medium and removed question Further information is requested labels Dec 16, 2021
@jjtang1985 jjtang1985 self-assigned this Dec 16, 2021
@ZhongpinWang
Copy link
Contributor

Hi @thulium3 ,

Thanks again for the feedback. This feature is now implemented in #2519 and you can use all six comparison operators for all primitive EDM types. The change should be included in the next (canary) release.

Best regards,
Zhongpin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new functionality prio: medium
Projects
None yet
Development

No branches or pull requests

3 participants