Skip to content

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

@stockbal

Description

@stockbal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions