0

I have an array of ids such as [1,2,3,4]. And i like to delete all the instance in a single go.

I tried to use bulkDelete of sequelize.js but it throws an error showing bulkDelete not a method. If i use destroy method of sequelize then only single entity is removed or deleted. While looping the delete clause it deletes the entry but the server stops.

jerin
  • 326
  • 1
  • 3
  • 11

2 Answers2

-1
  1. If possible,avoid id with numerical value.Check this

  2. myArray=[]; or myarray.length=0 //this will refresh your array!!

Assign your array with any one of the bove suggestion and your array with content will loose all its content.

Community
  • 1
  • 1
HIRA THAKUR
  • 17,189
  • 14
  • 56
  • 87
-1

Try to reintialize your array to empty as myArray=[];