Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2740

Miss functions for Batch operation

$
0
0

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


 

1.png2.png

 

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?


Viewing all articles
Browse latest Browse all 2740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>