on 2022 Jan 18 5:41 PM
Hi,
We are delegating service calls to a remote service as described here:
https://github.com/sap-samples/cloud-cap-samples/blob/main/bookstore/srv/mashup.js
It is working if we navigate straight into the entity, e.g. by following patterns like "/Books(123)/reviews", but we get a local query to the database if we try an expansion like "/Books?$expand=reviews" or if we come into the association from some other association like "/OrderItem/Book/reviews" (does not exist in the sample code, but hope it is clear what I mean anyway)
Would appreciate if we can get some guidance on how to use (and when to not use this):
Thanks in advance for any input or clarification!
//Carl
Hi Carl,
Reading a resource is handled differently than expanding one. With the former, Reviews is the target, with the latter, Reviews is a branch of a deep read, for which you cannot redirect. In general, CAP doesn't join data from different sources. GETs to /OrderItem(foo)/book/reviews should behave the same as to /Books(bar)/reviews.
The annotation is @Capabilities.ExpandRestrictions.NonExpandableProperties.
If this doesn't help, could you please provide some coding to make your scenario clearer?
Best,
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.