Hello,
I’m wondering why in the example you decided to use string type as a User’s primary key and not ObjectId like it is in Task’s primary key. Does it has something to do with User Object’s custom_data? So it can be only linked by string not objectId ? Can I use ObjectId instead? Does it has something to do with the partition key?
I have tried to change to ObjectId, and I get ERROR during the synchronization (SyncSession Start).
could not evaluate sync permissions with error: cannot compare to undefined (ProtocolErrorCode=206)
Partition:
user=5f8ad998ed73ed16ea144f62
The Id of MongoDB Realm users is a string. The fact that it’s generated from an ObjectId is an implementation detail and we do not make guarantees that this will be the case going forward. This is why the tutorial uses strings for the User object’s _id.