Hello,
can any one help me with storing modified(updated) data into android mobile cache (SQLite database)? In my mobile app I use libraries for android from SMP 3.0(Cache-3.3.1.jar).
What exactly is my problem? I will try to describe it on example:
- on NWGW i have created service with entitySet TESTSet (simple data model containing id as key and value, both string) and implemented delta token
- i can successfully get/donwload all data for TESTSet and store them into server cache, f.e. let's say that i get 2 entries for this collection [{"id":"1", "value": "new"}, {"id":"2", "value": "new"}] - i know that json is not supported in combination with delta query, but this is only for demonstration of data that i get for my collection
- after that i make some modification in table, where are the data for TESTSet stored: insert one row, update one row and delete one row, so the data now contain 2 rows [{"id":"2", "value": "updated"}, {"id":"3", "value": "new"}]
- now i am trying again to get/download all data for TESTSet into my mobile app and becouse i have implemented delta token, i am creating request for TESTSet with deltatoken, which i get in the first request
- everythinkg look fine, responds contained one new entry, one modified entry and reference do deleted entry, but if I use the functionality for storing data into sever cache (from responds i get the entity in string, which i parse using parser and save the result into cache using Cache#mergeEntries), the updated entry is not stored correctly, it looks like the cache skip this entry and did not merge or store it at all
- if i read from server cache data, which i stored/merged, i get 2 entries [{"id":"2", "value": "new"}, {"id":"3", "value": "new"}] and i really don't understand why the value for id=2 is not changed?
Can any one help me, where could be my the problem?
Best regards,
JG