Giter VIP home page Giter VIP logo

Comments (4)

kaztakata avatar kaztakata commented on July 28, 2024 1

Hi @alperdedeoglu san,

Thanks for your solution. I think extend CDS is effective for this situation.
I used your code and changed package.json to switch between production and development profiles like previous answer by Gregorwolf then working.

from btp-cap-multitenant-saas.

gregorwolf avatar gregorwolf commented on July 28, 2024

Please check this example: fiori/package.json#L42

from btp-cap-multitenant-saas.

kaztakata avatar kaztakata commented on July 28, 2024

Hi @gregorwolf,

Thanks for your answer. That is helpful and I already checked this code sample.

But my question is how to refer to db CDS from service CDS.
For example, when I want to add Shared entity to public-service.cds, now I am writing like below.

using {susaas.common as common} from '../../db/hana/data-model';
...
service PublicService @(path : '/catalog/PublicService', impl: 'srv/public-service') {
  
  entity Shared as projection on common.Shared
  ...

Hence I am specifying db/hana/ directory, I cannot use it in for local SQLite.
How to automatically switch path in service CDS, or something alternatives?

from btp-cap-multitenant-saas.

alperdedeoglu avatar alperdedeoglu commented on July 28, 2024

Hi Dear @kaztakata san,
Thank you very much for your contribution! 

To be honest, when we designed this "common container" approach, I personally only considered the database layer usage.
But your requirement is valid and makes sense. I think it might be useful for the rest of our valued susaas community members too.

I have a nice solution proposal for the problem you have.
This solution proposal should not change the behavior of the repository and should also fix the problem you have.

The main reason we have two files is that Shared  entitys DB artifacts are already created on deployment; therefore, we would like to mention it to HANA to avoid errors, but for sqlite we ne need to create the tables.

Can you please confirm if the changes on the fix/cc-localdev branch fix the problem you have?

I also linked the relevant PR to this issue.

from btp-cap-multitenant-saas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.