Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional namespace for generated cds #42

Closed
ThePlenkov opened this issue May 19, 2021 · 2 comments
Closed

Optional namespace for generated cds #42

ThePlenkov opened this issue May 19, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ThePlenkov
Copy link
Contributor

In our CAP project we use hana-cli mc to convert database schema to cds. Later we use this cds in service cds views.

However it's quite time consuming to export every time table by table if schema contains many tables.

To improve the experience we can just declare namespace and then use this namespace in using instruction.

As an example if mc generates this file as model.cds:

entity![com.company.package::Table_1]{
  ...
};
entity![com.company.package::Table_2]{
  ...
};
entity![com.company.package::Table_3]{
  ...
};
entity![com.company.package::Table_4]{
  ...
};

then it requires us to write manually in each cds:

using {![com.company.package::Table_1], ![com.company.package::Table_2], ![com.company.package::Table_3] ... } from './model';

What is the proposal:

use hana-cli mc --namespace schema. Then generated file will look like this:

namespace schema;
entity1, entity2....

and we can reuse it already much easier

using schema from './model';
@ThePlenkov
Copy link
Contributor Author

will propose in MR

@jung-thomas
Copy link
Contributor

Merged into version 2.202105.5 - will release that version soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants