In my project there is a managed object called “Group”.
This object itself can contain child group objects.
How do I solve this situation in CoreData and in the FetchedResultsController?
My first shot:
http://i46.tinypic.com/zvonpd.png
Thanks, Dan
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would make two separate relationships that are inverses of each other.
Group has a to-many relationship with Group named “children”, Group also has a to-many relationship with Group named “parents” and they are inverses of each other.
Or, if your data model only calls for one parent: Group has a to-many relationship with Group named “children”, Group also has a to-one relationship with Group named “parent” and they are inverses of each other.