I have a List Model (like a ToDo List).
I want to connect this List Model with a User so they can access (only) their own List’s.
I have now 3 options:
- Create a User Model with a
userId
field which includes the userID from auth. Then I could link this UserModel with the List. Inverse Relationship would allow me to get from a User to his List’s and the other way around. - Use Custom User Data and link this with the List. (but I think this should be only used for metadata, see Documentation)
- Place in the List Model the userID which I get from auth. Than query always for this id from RealmAuth.
Option 1 is right now my preferred way to go, because option 2 seems not to be live (docs say CustomUserData is stale/updates slowly) and I want that the User can directly access the List’s he created.
I search for an efficient solution and I want to add later the feature that a User can share a List with other User.
[React Native, I am quite new to Realm]
Thank You for your Feedback in advance