Skip to content

Creating a new record on an associated table needs first letter to be upper case (UserId) #16955

Answered by ephys
omarpr asked this question in Help & Questions
Discussion options

You must be logged in to vote

In Sequelize 6, foreign key attributes are prefixed by the target model name, so usually is capitalized. You can use a custom name like this: https://sequelize.org/docs/v7/associations/belongs-to-many/#foreign-keys-names

In Sequelize 7, we make the generated foreign key camelCase instead of PascalCase

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@omarpr
Comment options

Answer selected by omarpr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants