Skip to Content
0
Jan 18, 2022 at 05:41 PM

Issue with navigation pattern into delegated associations

259 Views

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):

  • Is there a way to generically redirect an association like the above to a remote service or does this type of redirection only support direct navigation from the superordinate context?
  • If not, is there a way to tell the framework about this constraint? We have been trying the "@Capabilities.ExpandRestrictions.Expandable: false" annotation but it does not seem to have any result (the query still gets through).
  • Is there a way to make SAP UI5 and/or fiori elements aware so it would form its queries accordingly?

Thanks in advance for any input or clarification!

//Carl