Skip to content

docs: fix bidirectional association examples in v7 upgrade guide#565

Merged
ephys merged 5 commits intosequelize:mainfrom
medgardo:fix-upgrade-to-v7-association-example
Apr 5, 2026
Merged

docs: fix bidirectional association examples in v7 upgrade guide#565
ephys merged 5 commits intosequelize:mainfrom
medgardo:fix-upgrade-to-v7-association-example

Conversation

@medgardo
Copy link
Copy Markdown
Contributor

Fixed bidirectional examples that were inconsistent.

  • The model Country and Countries was used. I updated all of the models in the example to use singular names.
  • Updated association aliases to be plural names citizen -> citizens as recommended for many-to-many associations
  • Fixed an error associating User to User (User.belongsToMany(User, { foreignKey: 'user_id' });) instead of to Country as further explained in the example

Thanks for the work on v7, it's looking great. I'd be happy to make changes if I misunderstood the intent of the examples here.

@medgardo medgardo requested a review from a team as a code owner April 11, 2024 20:16
@medgardo medgardo requested review from WikiRik and ephys April 11, 2024 20:16
Copy link
Copy Markdown
Member

@ephys ephys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@ephys ephys enabled auto-merge (squash) April 5, 2026 10:32
@ephys ephys merged commit f3be966 into sequelize:main Apr 5, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants