on 04-07-2016 2:31 PM
In SAP Mobile Platform (SMP) offline mode, does the data in local store get deleted whenever the app delta syncs with the server? So far the documentation and resources on this in the web are quite scarce. Really appreciate your kind help on this.
When we use Offline store feature of SMP for offline usage. As part of initial download, we get below two ultralite db files.
Whenever you make any CRUD operation on offline entity from Application, it will create request and get queued in request udb db.
When you will Flush(Client to Server) Sync, all requests from request db are sent to server and during Refresh(Server to Client) sync, all the entities which are updated on Server will flow from Server to Client based on !deltaToken concept and updated your Offline Entity DB.
Until and unless there is DELET operation performed on entities in offline store, you will not see records getting deleted from your offline store.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are in a similar scenario and we managed this situation with this work around specified in this post...
In my opinion it is not a definitive and clean solution, any idea??
I am posting post mentioned and with a similar scenario because in my opinion we can find a solution with different perspectives and points of view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you do REFRESH it brings down the server row from the backend. So now the local and server rows exist in the Offline Store. Momentarily there is a duplicate row as the true version of the row from the server replaces the temporary local copy.
There is a duplicate now in the Offline Store, but that’s expected because we haven’t performed the local row clean-up yet (post-refresh processing).
If you use the ENTITY_ID_MAP to delete any local rows that now have a corresponding (duplicate) server row. But since the data in the ENTITY_ID_MAP is incorrect, (In this case) this is failing. The cleanup is not removing the local row and both the local and server rows remain in the store.
Post-refresh processing( local row clean-up)
The copy received from the server will be different from the copy on the remote. Specifically the key for the entity will be different. Lodata needs to be aware that the key is changing for this entity and update any new references to the entity to use the new key.
NOTE: The Offline store does not verify the key properties of locally created entities.
It is possible for an application to insert multiple entities with the same key properties locally.
However the Offline store expects that the server will reassign keys when the entities are posted to the backend.
There is a KBA that explains why you may see duplicate rows, 2287622, but this was an oData backend issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.