Using Sequelize, I\'ve created two models: User and Login.
User
Login
Users can have more than one Login, but a login must have exactly one user, which me
I have the same issue recently! I have a typo mistake with the foreignKey config. Use field instead of name caused the issue.
field
name
The change below will fix it.
{ foreignKey: { name: 'userId', allowNull: false, } }