A stupid question...
I want to consume a remote service (oData) in SAP CAP Java and the URL/result must look like this: xyz.com/myEntity(key1='12345',key2=datetime'2022-02-01')/Results
My select looks like:
<code>SELECT.from(MyService_.CDS_NAME).columns(c -> c.Results().expand(...)).where(w -> w.key1().eq('12345').and().key2(...);
Our problem now is that this Where condition is of course implemented as $filter. But we have to address the entity via keys to get the results. And that without expand. The only examples I found always use byID and that only works with a key. Also other filter/match methods have led to the same undesired result.
The resulting URL looks like this:
<code>//xyz.com/myEntity?$filter=key eq '123' etc.
Is this possible in the Java SDK to have the URL look like described in the beginning?
Or do I have to build a HTTP client myself?
Unfortunately, I can't pull the root entity first. I have to go this way to address the keys and /Result directly. Please don't ask why.