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

Kapsel Offline OData - Flush works, but doesn't clear sap.islocal() flag

$
0
0

I am working on a Cordova/SMP Kapsel based application using the OData Offline plugin.

 

The application is designed to be in "offline" mode all the time, except when the user clicks a sync button, which then executes the flush() and then upon success, then refresh(). 

 

All this is working, except I have noticed that after the flush/refresh, the local data objects which had been modified or created still shows up along with the actual data which has been pulled from the backend, so there appear to be duplicates.  We noticed the issue because it doesn't seem to occur for all entities.

 

We have been able to correct the issue for some entities by changing the return (the backend is SAP NW GW) to return the fully updated object in the return for the POST/CREATE request.  This seems to have the resolved the issue for some entities but not all.

 

The offline store correctly removes the object from the request queue (so it does not get processed any more) but it does not remove the flushed data like it is supposed to.  I assume there is some sort of mapping that gets done internally that allows it to figure out which record to remove after a successful flush, but can't seem to figure it out. 

 

Any ideas?


Viewing all articles
Browse latest Browse all 2801

Trending Articles



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