on 2021 Jun 04 5:08 PM
Hi,
I am working with the SAP Cloud SDK and generate a query with it via requestBuilder.
The following code generates the following query
.filter(Entity.ID.equals(id), Entity.EXTERNAL_IDS.filter(any(ExternalIds.EXTERNAL_ID.equals(id))))
$filter=(Id eq <id> and (ExternalIds/any(a0:(a0/ExternalId eq '<id>'))))
This is so far valid, but now I want to combine the two filters with an OR expression.
$filter=(Id eq <id> or (ExternalIds/any(a0:(a0/ExternalId eq '<id>'))))
For this I adjusted my code as follows.
.filter(or(Entity.ID.equals(id), Entity.EXTERNAL_IDS.filter(any(ExternalIds.EXTERNAL_ID.equals(id)))))
But unfortunately I get the following error message.
Argument of type 'OneToManyLink<Assets, ExternalIds>' is not assignable to parameter of type 'Filterable<Assets>'.
Type 'OneToManyLink<Assets, ExternalIds>' is missing the following properties from type 'Filter<Assets, FieldType | FieldType[]>': field, operator, valuets(2345)
How can I build the query so that the two filters are linked with an OR expression?
Regards
Simon
As Simon created an issue , I will not update here. Please check the status from the link to our open source repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
10 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.