sequelize-typescript icon indicating copy to clipboard operation
sequelize-typescript copied to clipboard

Hardcoded createdAt field when using underscored option

Open zignis opened this issue 3 years ago • 0 comments

Issue

Versions

  • sequelize: latest
  • sequelize-typescript: latest
  • typescript: -

Issue type

  • [x] bug report
  • [ ] feature request

Actual behavior

Even when using the underscored option, typescript keeps complaining about .created_at field, because its hard-coded as createdAt here:

https://github.com/sequelize/sequelize-typescript/blob/62a0863051bd074243dab223eebf5e056aa46e0d/src/model/model/model.ts#L34

Expected behavior

Should be able to use created_at.

Steps to reproduce

Configure the table using the underscored option.

zignis avatar Sep 08 '22 00:09 zignis