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.

4

2 回答 2

-1
  1. 如果可能,请避免使用带有数值的 id。检查这个

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

为您的数组分配任何一个 bove 建议,您的数组内容将丢失其所有内容。

于 2013-09-04T14:38:35.340 回答
-1

尝试将您的数组重新初始化为空 myArray=[];

于 2013-09-04T14:51:13.670 回答