Skip to content

Model values are undefined while data values are #13527

Closed

Description

@Androz2091

Issue Creation Checklist

[x] I have read the contribution guidelines

Bug Description

What do you expect to happen?

I expect Sequelize to parse my rows the right way.

What is actually happening?

Capture d’écran 2021-10-01 à 18 57 41

The rows are not parsed. I used sequelize.sync({ force: true }); and the same code is working on my laptop (but does not parse anything on my VPS).

Environment

  • Sequelize version: 6.6.5
  • Node.js version: v16.10.0
  • If TypeScript related: v4.4.3

Bug Report Checklist

How does this problem relate to dialects?

  • I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s): postgres
  • I don't know, I was using PostgreSQL, with pg version 8.7.1 and database version 13

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • [x ] Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • [] No, I don't have the time and I wouldn't even know how to start.

Activity

  1. Androz2091 commented on Oct 3, 2021

    @Androz2091
    Author

    So I switch to Typeorm
    Hope you'll be able to fix the bug anyway!

  2. hugo-aviles-signpost commented on Jan 7, 2022

    @hugo-aviles-signpost

    Hi @Androz2091 just curious in your tsconfig.json is your "target" set it to "ESNEXT"? If yes change it to "ES2021" and the issue should be fixed.
    Hope this could help any other person with the same issue.

  3. ephys commented on Jan 7, 2022

    @ephys
    Member

    The documentation has been updated to explain why it fails & how to make it work with TypeScript:

    https://sequelize.org/v6/manual/model-basics.html#caveat-with-public-class-fields

  4. vrepettoPolo commented on Jun 24, 2025

    @vrepettoPolo

    Was using babel, tried everything and nothing worked. Changing to tsc worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions