Answer the question
In order to leave comments, you need to log in
How to resolve database object id conflict between mobile and server?
The problem is this. The boss wants to file an offline version of the mob. applications so that you can create an object offline, and when the Internet appears, send it to the online database. What if the server already has an object with the same id? How to solve the problem as painlessly as possible without touching the server?
PS mob. base option - Realm, and the server in SQL
Answer the question
In order to leave comments, you need to log in
Для mobilid используйте в базе на сервере отдельное поле.
Либо - не передавайте ID вовсе.
После передачи на сервер, нужно синхронизировать ID с сервером.
When synchronizing, delete everything from the mobile and fill in the local database again with the deleted IDs. And when importing a mobile database, ignore the ID.
Make objects locally, transfer them to the server to the "sump" from which they will be added to the main system with a loop ...
pk mobile and server are different pk, this is the main thing, and then from the task and the structure of the database
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question