Sharing CoreData objects in CloudKit also sharing all relationships. How to model loose one-to-many relationships?

Viewed 33

I'm using CoreData with CloudKit mirroring.

Example model: NoteObject and TagObject

NoteObject has a relationship to TagObject. Anytime I add a tag to a Note for example.

However if I share the NoteObject to another CloudKit user, it shares all the Tags. Which in turn shares all the entries those tags are related to.

So sharing one NoteObject can, through relationships, end up sharing quite a few notes. Obviously not intended.

I'm thinking it should be easy to simply store a UUID property referencing any one-to-one relationships.. With that said, one-to-many and many-to-many relationships like my Note to TagObjects does not work.

I'm thinking of creating some kind of join entity that only stores UUIDs.. but wanted to see if anyone had better ideas

0 Answers
Related