Bulk insert


#1

Is there a limitation or what I’m doing wrong, when updating the DB for my enterprise app, I can only insert the first 1000 rows, and then it stops inserting.

    var linea = [];
    var defer = $q.defer();
    var promises = [];
    var i = 0;

    for(i=0; i< response.length; i++){        
      if(response[i]){
          linea = response[i].split('\t');
          promises.push(
            Product.add({ id: parseInt(linea[0]),
              categoria: "unica",
              codigo: linea[1],
              descripcion: linea[3],
              moneda: linea[12],
              mult1: parseInt(linea[6]),                                
              mult2: parseInt(linea[8]),
              mult3: parseInt(linea[10]),
              prov: linea[2]
            })
          );

        }          
    }

    $q.all(promises); // do the magic