sql delete - use bulkDestroy in Sequelize -


i'd know how delete values in array, array contains ids like: [1,2,3,4], i've tried:

models.products .destroy({where: {req.body.ids}}) .then(function(data){ res.json(data) }) 

but got data undefined, , nothing deleted...

you've missed id criteria.

model.destroy({ where: { id: [1,2,3,4] }}) 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -