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

CDS type "Date" to TypeScript type "Date" conversion is incorrect #40

Open
stockbal opened this issue Sep 23, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@stockbal
Copy link

Hi,

first of all, great job in providing this tool 😎.

However, I discovered that you cannot really use Date objects at Date elements of a CDS entity.
The framework will return strings like 2022-09-01 for such elements, and if you pass a Date object during an INSERT.into call nothing will be written in the database

We are using these npm versions:

  • @sap/cds: 5.9.8
  • @sap/cds-compiler: 2.15.4
  • @sap/cds-dk: 6.0.3
  • @sap/eslint-plugin-cds: 2.4.1

Right now we are just rewriting such Date properties in the generated type files back to string as a workaround.

Regards,
Ludwig

@thisisevanfox
Copy link
Collaborator

Hi @stockbal,

We'll look into this one. Thanks for reporting.

Kind regards
Johannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants