📄️ Basics
Sequelize provides what are called associations.
📄️ HasOne
The HasOne association is used to create a One-To-One relationship between two models.
📄️ HasMany
The HasMany association is used to create a One-To-Many relationship between two models.
📄️ BelongsTo
The BelongsTo association is the association all other associations are based on. It's the simplest form of
📄️ BelongsToMany
The BelongsToMany association is used to create a Many-To-Many relationship between two models.
📄️ Association Scopes
This section concerns association scopes, not to be confused with model scopes.
📄️ Association FAQ
Multiple associations to the same model
📄️ Polymorphic Associations
A polymorphic association is an association that can target multiple models. For example, imagine a Comment model that can belong to either a Article or a Video.