1

There is a lot of information about CRUD in SAPUI5 but most of them are for basic scenarios. What is the best way to do a "create" for a collection of items? Should it be called in a loop e.g. :

        var oNewProduct = {};
        for (var i = 0; i < aProducts.length; i++) {
            oNewProduct = {
                id: aProducts[i].id,
                name: aProducts[i].name
            };
            oModel.create("/ProductSet", oNewProduct);
        }

Does the v2.oData model send it as a batch automatically? Or do I need to specify batch groups and set them as deferred manually?

Radek
  • 1,403
  • 3
  • 25
  • 54
  • 1
    I think this will help you : http://stackoverflow.com/questions/26582351/sapui5-batch-operations-how-to-do-it-right and http://stackoverflow.com/questions/26807658/updating-odata-via-batch-operation-in-sapui5 – Rahul Bhardwaj Jan 11 '17 at 15:39

0 Answers0