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

CSN is also a valid option for model to connect #209

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

ThePlenkov
Copy link
Contributor

I use a preloaded model to connect to the database and it works. However TS doesn't allow to use. This PR fixes it.

  const model = await cds.load('models/public');
 const db = await cds.connect.to('db', {
    model: model as any,
    kind: 'hana',
    credentials: requires?.db?.credentials,
  });

@daogrady
Copy link
Contributor

Hi Petr,

thanks for the contribution!
@johannes-vogel @David-Kunz could one of you please confirm that this is valid? Thanks!

Best,
Daniel

@ThePlenkov
Copy link
Contributor Author

HI - what do we do with this PR? Can we merge it?

@daogrady
Copy link
Contributor

daogrady commented Oct 2, 2024

Hi Petr,

according to CAPire, this is indeed correct. We can merge this.

Best,
Daniel

@daogrady
Copy link
Contributor

daogrady commented Oct 2, 2024

Please just add a CHANGELOG entry for this change.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@daogrady daogrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution!

@daogrady daogrady enabled auto-merge (squash) October 2, 2024 08:34
@daogrady daogrady merged commit 241936e into cap-js:main Oct 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants