Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

bulk create in sequelize

var data = [{
   'cat_name':'fashion'
  },
  {
   'cat_name':'food'
  }
 ];

orm.models.category.bulkCreate(data,{individualHooks: true})
 .then(function(response){
   res.json(response);
 })
 .catch(function(error){
   res.json(error);
 });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bulk #create #sequelize
ADD COMMENT
Topic
Name
6+1 =