title: sapui5 batch with sap.ui.model.odata.v2.ODataModel
body: <p>I created table with data using JSONModel</p>
  
  <pre><code>    var oModel = new sap.ui.model.json.JSONModel(query);
      oTablePrio = sap.ui.getCore().getControl("idTablePrio2");
      oTablePrio.setModel(oModel, "Prio2"); 
  </code></pre>
  
  <p>Everythink look and work good.</p>
  
  <p>Now i have added new column(prio) where i will change value. After changing i would like to save every rows( in the SAP ztable ) after clicking buton save .
  I made something like this</p>
  
  <pre><code>var oModel = new sap.ui.model.odata.v2.ODataModel(gServiceUrl);
          oModel.setUseBatch(true);
          for (var i = 0; i &lt; data.length; i++) {
              sEntry.Matnr = data[i].Matnr;
              sEntry.Bbynr = data[i].Bbynr;
              sEntry.Prio = data[i].Prio;
  
  oModel.update("/WielosztSet('"+data[i].Bbynr+"')", sEntry, {
                    method: "PUT",  function(){
                  alert('Data Updated Successfully');
                   location.reload(true);
                    },function(){
                          sap.m.MessageToast.show('Update failed',{duration:1000});
  
                    }});
  }
  </code></pre>
  
  <p>Now only it sends data only with the last row. 
  I wrote that i cannot update more than one row in this way and I need to make batch. 
  I connot find how to create working batch for uploding data with  <code>sap.ui.model.odata.v2.ODataModel</code></p>
  
  <p>Please give me some advice.</p>