Hi all,
I'm try to do a batch operation. I've read this article:
Gateway Batch Calls from SAPUI5
However, I get this error message :
Uncaught TypeError: oDataModel.createBatchOperation is not a function
So I check this object. Indeed, I haven't found this method, however, I see the methods like _createBatchRequest, _submitBatchRequest, etc, please see the pictures
the method we use to create this ODataModel object is :
In Component.js
var oAnalysisDataModel = new ODataModel(oConfig.remoteAnalysis);
//oAnalysisDataModel.setUseBatch(false);
this.setModel(oAnalysisDataModel,"analysis");
Then Controller.js
var oOwner = this.getOwnerComponent();
var oDataModel = oOwner.getModel('analysis');
Please help me
Thanks
Yan Xu
UPDATE
If I use : oDataModel.setUseBatch(true);
then
oDataModel.create('/entities', entity1);
oDataModel.create('/entities', entity2);
oDataModel.create('/entities', entity3);
It can create a batch automatically and fire it automatically. But I don't know should I setUseBatch(false) after?