Start a new topic

Remote delete - with sync

Now fixed the sync issue (!) time to ask my next :)

Say the data is deleted on the server end (or a 2nd device, that happens to be on the same user login)

And now assume the data is on the device (mobile) and is now over max age. The "server sourced" data never overwrites the locally held, but now server deleted, data (as it never comes back in the response), so you are left with a cached, timed out, data on the device..... (which means that all your queries where max age is expired are run online, rather than offline)

I can think of lots of clever ways of fixing this (e.g. marking as deleted rather than actually deleting) but to keep it simple what I think I want is a $kinvey.Sync.destruct(); but on a single collection, not on ALL offline data

Then I can just run that once every so often (e.g. once a week) - and everything will fix itself normally

Can’t you just clear the collection locally?


Kinvey.DataStore.clean('collection-name', null, { offline: true, track: false });


Note I added the `track` flag, which is used internally to disable marking the items deleted as to-be-synced.
Hi Mark

Kind of works - has other impacts - but it has me working down the right path. Thanks!

Login or Signup to post a comment