@@ -205,7 +205,7 @@ This will create a new model called UserProject with the equivalent foreign keys
...
@@ -205,7 +205,7 @@ This will create a new model called UserProject with the equivalent foreign keys
Defining `through` is required. Sequelize would previously attempt to autogenerate names but that would not always lead to the most logical setups.
Defining `through` is required. Sequelize would previously attempt to autogenerate names but that would not always lead to the most logical setups.
This will add methods `getUsers`, `setUsers`, `addUser`,`addUsers` to `Project`, and `getProjects`, `setProjects` and `addProject`,`addProjects` to `User`.
This will add methods `getUsers`, `setUsers`, `addUser`,`addUsers` to `Project`, and `getProjects`, `setProjects`, `addProject`, and`addProjects` to `User`.
Sometimes you may want to rename your models when using them in associations. Let's define users as workers and projects as tasks by using the alias (`as`) option. We will also manually define the foreign keys to use:
Sometimes you may want to rename your models when using them in associations. Let's define users as workers and projects as tasks by using the alias (`as`) option. We will also manually define the foreign keys to use: