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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -