sequelize / website

Our beloved website that contains all versions of our documentations and the API references.
https://sequelize.org
29 stars 154 forks source link

Model Associations in the ES6 Class Way #758

Open Shazam72 opened 4 months ago

Shazam72 commented 4 months ago

Issue Description

When using the class way (ES6) to create models in sequelize, the documentation failed to explain correctly how to implement associations (HasOne, HasMany, BelongsTo, BelongsToMany and also Polymorphic relationship). All in the documentation is about .define() method. Basically that leads developpers to search through the internet about the correct way to use associations and that's already good but it would be perfect if all the informations relatively to sequelize were to be found directly on the documentation instead of forums where sometimes everything's mixed

What was unclear/insufficient/not covered in the documentation

The documentation failed to provide sufficient intel about associations using the class way (ES6)

If possible: Provide some suggestion on how we can enhance the docs

Additional context

<-- Add any other context or screenshots about the issue here. -->

### Tasks