Core Data Many2Many Relationships
Core Data Many2Many Relationships
- Subject: Core Data Many2Many Relationships
- From: Chris Blunt <email@hidden>
- Date: Thu, 4 Aug 2005 09:50:36 +0100
Hi,
I have a core data model set up for domains and extras, where one
domain can have several extras and one extra can belong to many
domains. I have set up an object in the middle called DomainExtra as
a link to connect the two:
+-------------+ +----------------+
+---------------+
| DOMAIN |<----------->>>| DOMAINEXTRA |<<<-------->|
EXTRA |
+-------------+ +----------------+
+---------------+
In my app, a user can set up a number of domains and a number of
extras, they will then be able to switch extras on and off for each
domain. In php/MySQL (where my DB development experience lies), this
would be fairly simple to do by inserting a domainextra record with a
relation to the domain and the extra, and then using a SELECT
statement to determine which extras existed for the domain.
However, I cannot see how to do this programmatically in core data;
I'm guessing I use some sort of searching object (predicate?) but not
sure how this would link in to any NSArrayControllers..?? I have
tried to reading the CD documentation but have had no luck.
Could anybody point me in the right direction, or towards some
documentation that describes how to achieve what I'm trying? Any help
would be greatly appreciated!!!
Thanks in advance,
Chris
--
www.chrisblunt.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden