website icon indicating copy to clipboard operation
website copied to clipboard

docs: fix bidirectional association examples in v7 upgrade guide

Open medgardo opened this issue 2 years ago • 0 comments

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 avatar Aug 25 '23 17:08 medgardo