cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable batch requests in Odata V4 model

balbino_soaresferreirafil
Active Participant
0 Kudos
2,965

Hi guys,

Im using a Odata v4 backend server to my SAPUI5 frontend app, but this server not support batch requests. Is there a way to disable batch requests using SAPUI5 V4 model? When I set the datasource to Odata v4, the requests are done with $batch.

To Odata v2 I can do this to disable.

"models": {
    "yourModel": {
        "dataSource" : "yourDataSource",
        "settings" : {
          "useBatch" : false
        }
    }
}

But I cannot find a way in Odata v4 model.

Thanks! Any help will be welcome!

View Entire Topic
vvdries
Contributor

Hi Balbino,

You can use Group IDs to control the OData V4 model's use of batch requests. Setting it to $direct will disable the batch requests and send it directly.

More information about OData V4 in SAPUI5 can be found in the SAPUI5 Documentation.

Kind regards,

Dries

balbino_soaresferreirafil
Active Participant

Thanks Dries,

Worked perfectly .

    "api": {
        "settings": {
          "synchronizationMode" : "None",
          "groupId": "$direct"
        }
0 Kudos

can you please sample manifest.json where group id is used? I tried multiple ways but it is not wokring.

marie-pierre_mela
Product and Topic Expert
Product and Topic Expert
0 Kudos

Here an example in oData V4:

"dataSource": "mainService", "settings": { "autoExpandSelect": true, "operationMode": "Server", "groupId": "$direct", "synchronizationMode": "None", "earlyRequests": true