How to do X using Sequelize
I don’t know about you guys, but I always have an annoying time trying to figure out how to make Sequelize work — the documentation seems to have a dearth of examples. Here’s a few examples for “common” functionality.
Get plain objects instead of Sequelize Instances after bulkCreate
models.Item.bulkCreate(values)
.then(results => results.map(result => result.get({ plain: true }))) // Convert to plain
.then(items => console.log(items)) // Plain object array [{...}, {...}, ...]
Pretty easy, use .get({ plain: true }) on any Sequelize instance to convert it to a plain JavaScript object.
Sequelize bulkCreate but ignore any duplicates
models.Item.bulkCreate(values, {
ignoreDuplicates: true
})
Just use the ignoreDuplicates option and pass it as the second argument.
Deleting a row
Delete is called destroy, use it as so:
models.Items.destroy({
where: {
id: 42
}
})
Increase engagement and retention
Our whitelabel AI vibe coding platform allows your users to customize and build exactly what they need, on top of your platform.
My customers say that this is the best way to increase engagement and retention in 2026.
Curious? Check out Giga Catalyst to learn moreOr, fill out this form and I'll personally reach out to show you how it works: