Search code examples
parse-platformlocal-datastore

Do objects pinned in Parse Local datastore get deleted as well when it's deleted on the backend?


Suppose that there are two iDevices: device1 and device2. Both devices have pinned some object foobar retrieved from the Parse backend.

device1 performs a -deleteEventually on foobar. This causes the object to also be automatically unpinned. This deletion is propagated to the backend, and the backend now has removed foobar.

device2 performs a query that would normally fetch foobar; except, it's missing.

What happens to foobar on device2's local datastore?


Solution

  • As local datastore is...local, then the object will be keeped in the second device until it receives an update about the objects, and pinned those again (after unpin obviously). No changes will be made in the second one if you are not requesting new objects from the Backend.