Describe the bug
With persistedCollectionOptions (ExpoSQLitePersistence) + queryCollectionOptions + offline-transactions (although I imagine it probably occurs without offline-transactions given the diagnosis below)
I've done a little bit of debugging and it seems to point to the owners metadata not getting set properly when inserting, so when the query responds on app launch it doesn't clean up the stale data.
To Reproduce
Steps to reproduce the behavior:
- Insert item on app (sync occurs via the offlineExecutor mutationFn) - item appears in db + api response
- close app
- delete the inserted item from the db (no longer appears in list items API response)
- open app to list items
Expected behavior
I would expect in step 4, it would realise that the API response doesn't contain the inserted item anymore, and clean up the stale item. Instead, the stale item remains, despite the API response returning [].
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
- Device: iPhone 13 Pro
- OS: iOS 26.5
- Expo Development Build SDK 56
Additional context
Note there is another bug related to the typing of SQLite.SQLiteDatabase -> ExpoSQLiteDatabaseLike so I initialise like this: const persistence = createExpoSQLitePersistence({ database: database as unknown as ExpoSQLiteDatabaseLike, }); - but this shouldn't cause this issue. There is a PR addressing this here (I haven't tested - but it has been raised): #1560
Describe the bug
With persistedCollectionOptions (ExpoSQLitePersistence) + queryCollectionOptions + offline-transactions (although I imagine it probably occurs without offline-transactions given the diagnosis below)
I've done a little bit of debugging and it seems to point to the owners metadata not getting set properly when inserting, so when the query responds on app launch it doesn't clean up the stale data.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect in step 4, it would realise that the API response doesn't contain the inserted item anymore, and clean up the stale item. Instead, the stale item remains, despite the API response returning [].
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Note there is another bug related to the typing of
SQLite.SQLiteDatabase->ExpoSQLiteDatabaseLikeso I initialise like this:const persistence = createExpoSQLitePersistence({ database: database as unknown as ExpoSQLiteDatabaseLike, });- but this shouldn't cause this issue. There is a PR addressing this here (I haven't tested - but it has been raised): #1560