Sequelize: Where is an example of using bulkDelete with criteria?

I tried using @Michael McCabe’s suggestion and kept getting ERROR: Invalid value [object Object]. Once I got rid of where from the second argument (the identifier argument), I was able to get it working:

down: (queryInterface, Sequelize) => {
  const Op = Sequelize.Op
  return queryInterface.bulkDelete('users', {id: {[Op.in]: [2, 3]}}, {})
}

Leave a Comment

tech