cds-dbm icon indicating copy to clipboard operation
cds-dbm copied to clipboard

Imported Schema Definition dropped from gen/srv/srv/csn.json

Open dus2001 opened this issue 1 year ago • 1 comments

Hello,

I have two imported schemas (provider) in my CDS (wrapper) project. Both the imported schemas are different services exposed by other CDS projects. The wrapper schema has its own layer of database and filtering/massaging of underlying services. So essentially the wrapper CDS project exposes its own services that builds on top of the underlying services. In addition to that, partial entities from the underlying schema is also exposed with filtering.

the underlying project exposes a full service. the wrapper application should only use "a view" of the underlying service. In future I have plans to build other projects that utilize other aspects of the underlying service.

When testing locally all the 3 perform correctly . the wrapper CDS provides results from its own implementation and also exposes the underlying services (deployed on BTP and accessed via destination service). The problem arises when wrapper is deployed in BTP. The csn.json in gen/srv/srv does not contain the full definitions . the csn.json has only 2 definitions (1. wrapper 2. one of the underlying service). The second underlying service is not present in the csn.json of gen/srv/srv.

Just to note, all 3 definitions (wrapper and 2 underlying) are present correctly in db/csn.json. Just to tryout, I rebuild the entire thing without the CDS-DBM / CDS-PG. This csn.json in srv has the correct definitions.

Hence I am assuming this is coming from cds-dbm.

Please help

Thank you

dus2001 avatar Apr 09 '23 10:04 dus2001

I did attempt to debug and find the root cause. Unfortunately, I cannot provide the screenshots and the content in this public forum but if you would like to see it I can join a private session or connect with you directly to explain the services or share the content. The error is observed in cds build that internally is relying on cds-dbm. Since this is working locally.

I appreciate the effort you are putting into this. If you can guide me towards how to debug the build itself or the design I can attempt to troubleshoot. I am a new comer to nodejs world. I come from ABAP world with decent java understanding. But I feel comfortable playing around the nodejs debugging with guidance.

dus2001 avatar Apr 09 '23 10:04 dus2001