I’m trying to figure out how to deal with situations where objects are created in a mobile device Realm while the device is offline and a primary key has to be generated locally. Then later when ROS syncs to the main RDBMS, that database will generate its own PK based on its auto increment. However, I cannot change that PK on Realm. I’ve tried using an optional field for the PK in realm, but that only allows a single record with a NULL PK which will not work.
How is this generally handled? Thank you!