Defining Many-to-Many Associations in Sequelize
Reference: Sequelize docs on association
Let’s say we have two models:
We know that a film can be shown at many film festivals and that, conversely, a festival can show many films. This is what is known as a many-to-many relationship.
Knowing this, we can set up our associations: