Skip to Content
Jan 20, 2022 at 10:04 AM

Unsubscribing CAP application deletes tables created by other CAP application in the same container


Your environment (run the following commands):

  • cds -v
  • @sap/cds: 5.6.4

    @sap/cds-compiler: 2.10.4

    @sap/cds-dk: 4.7.2

    @sap/cds-foss: 3.0.0

    @sap/cds-mtx: 2.5.1

    @sap/xssec: 3.2.11

    Node.js: v16.13.0

  • node -v


  • java -version (if applicable)

Steps to reproduce:

I have created few CAP application which are subscribed by tenant. On first CAP application subscription, the DT and RT HDI containers and schema are created. Post that if I subscribe other CAP application then no new HDI container created. The CAP application uses the same HDI container and generates tables in same schema.

Now the issue is, if tenant unsubscribe any of CAP application then HDI container is also deleted and schema/ tables created by other CAP application is also deleted.

Does CAP framework not verify, if HDI container is shared by multiple CAP application?

Do We need to handle it in unsubscribe event?

Additional information (if applicable):

  • project files
  • logs
  • screenshots
  • ...