Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to flush/refresh specific offline oData entities in SAP Cloud Platform?

The standard flush/Refresh offline oData functions are performed on all entities in the offline Store.

This, of course, has implications on mobile data and performance.

Is there a way to FLUSH/REFRESH only specific entities in the offline store?

like image 300
Adam Harkus Avatar asked Nov 17 '22 14:11

Adam Harkus


1 Answers

You can write the entity you want to refresh or flush in the third parameter of the methods as an array of strings where each string is the name you put to each "entitySet" on the definingRequests object.

Imagine you defined this on the creation of the store:

"definingRequests" : {
    "foo" : "/fooSet",
    "bar" : "/barSet"
}

Then, if you only want to refresh the foo entity, the refresh method will be like this:

store.refresh(refreshCallback, errorCallback, ["foo"], progressCallback);
like image 70
Albert Avatar answered Dec 18 '22 19:12

Albert