DEV Community

Cover image for The Comprehensive Sequelize Cheatsheet

The Comprehensive Sequelize Cheatsheet

Aniket on May 08, 2020

Sequelize is the most famous Node ORM and is quite feature-rich, but while using it I spend much of my time juggling around between the documentati...
Collapse
 
kasir-barati profile image
Mohammad Jawad (Kasir) Barati

Hi. I have the same problem with Sequelize, I could not understand the aliases in Sequelize. can you write a post about it?

for example, I create order & user models. now i wanna define aliases for them:
user has multiple order, order has one user.
can you simplify it for me? how should i define the aliases & how should i use them in the find queries?

Collapse
 
tylerjusfly profile image
Tyler

I need to figure this out to...

Collapse
 
kasir-barati profile image
Mohammad Jawad (Kasir) Barati

Hello Momoh

I like to share one thing with you. I am no longer use Sequelize. I switch to prisma and now I got over Sequelize and its endless bottlenecks. Just try prisma

Collapse
 
juanccq profile image
Juan Carlos Choque Quispe

Great post, as Sequelize now creates a model with ES6 classes, could you add an example of this, specifically the relationship between other models.

I tried to do but I think there is no enough documentation.

Collapse
 
projectescape profile image
Aniket

This took way more time than I expected, but life will be much easier moving forward 😌

Collapse
 
chinedumonyema profile image
Chinedum Onyema

Great summary. Thank you.

Collapse
 
samihmz profile image
Sami Hamaizi

that was so helpfull, thank you

Collapse
 
sm0ke profile image
Sm0ke

Great post. Thank you!

Collapse
 
phamminhhaiau12035071 profile image
PhamMinhHaiAu-12035071

great post. vote Sequelize and typeorm

Collapse
 
projectescape profile image
Aniket

Haven't used typeorm yet!

Collapse
 
k3sha7 profile image
k3sha7

What about migrations?

Collapse
 
arinmovsesian profile image
Arin Movsesian

👌