paulw11 / Seam3

Cloudkit based persistent store for Core Data
Other
209 stars 25 forks source link

1-to-Many #69

Closed maxwell0803 closed 6 years ago

maxwell0803 commented 6 years ago

I created a simple 1-to-many core data sample project. I can see the relationship being displayed fine before I added Seam3. After adding Seam3, I can no longer see the relationship between the objects inside of my DetailTableViewController. The relationships do appear correctly in the CloudKit Dashboard, but they are no longer displayed inside of the local DetailTableViewController. I can email you the project files, if you want to see them? Thank you for your help!

core data structure:

CD-Master Structure.docx

AppDelegate configured with Seam3 integration:

AppDelegate.swift.zip

paulw11 commented 6 years ago

Have you created the inverse relationship in your Core Data model? CloudKit does not support to-many relationships, so Seam3 relies on the to-one inverse relationship

maxwell0803 commented 6 years ago

The to-one inverse relationship is automatically configured inside of Core Data when I select 'inverse'. Please look at the core data structure image that is inside of the Microsoft Word file. Then look at the AppDelegate.swift.zip file that shows how I included SMStore access. Below is a Microsoft word document that shows all possible core data relationships, and connections graph. Thank you for your time and help!

P.S.: The core data relationships saved and displayed fine until I added the Seam3 Cocoapod. So maybe I configured the AppDelegate for Seam3 incorrectly?

CD-Master Structure.docx

maxwell0803 commented 6 years ago

I solved my issue. I did not realize that SMStore.predicate( ) was using a to-one relationship to find the to-many relationships that it associated with. Thank you for your hint Paul !