I am trying to create a tag system using CloudKit. I have a type called Article and a type tag. Each article can have several tags. I want my data to be normalized, since the same tags can appear on several articles, and articles can have several tags, I need a many-to-many relationship. In the old DB-stuff school, this would require a join table.
How do you do it in CloudKit?
In any of the apple documentation, you can only find examples of one-to-many relationships.
So, I created a connection table type called ArticleTag, which consists of two CKReferences. One for linking to an article and one for linking to a tag.
This should work, but what is the best way to request tags in each article?
Regards, Esben
source share