You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define model User and Project with option underscored
User.belongsTo(Project)
// This will not work and project_id will not be set (NULL)
await User.create({first_name: 'firstUser', last_name: 'firstUser', project_id: 1})
// This will work and it will set project_id to 2
await User.create({first_name: 'secondUser', last_name: 'secondUser', projectId: 2})
What do you expect to happen?
project_id should be the one working (as in sequelize 4)
What is actually happening?
projectId is the one working
Environment
Dialect:
[] mysql
Dialect library version: 1.6.5
Database version:8.0
Sequelize version: XXX
Node Version: 10.15
OS: linux/mac
Tested with latest release:
Note that even when you create the entry with underscored: true, you still get the camelcase name.
This means that underscored: true is broken as of Sequelize 5.10.1.
Activity
frastlin commentedon Jul 18, 2019
Note that even when you create the entry with underscored: true, you still get the camelcase name.
This means that underscored: true is broken as of Sequelize 5.10.1.
papb commentedon Jul 25, 2019
Closing in favor of #11225.
When #11225 gets closed, if anyone thinks this particular issue is still an issue, please ping me.