Core Data: Master-Detail question
Core Data: Master-Detail question
- Subject: Core Data: Master-Detail question
- From: "Frederick C. Lee" <email@hidden>
- Date: Thu, 22 Dec 2005 14:07:40 -0800
Greetings:
I'm trying to construct a master-detail binding using
NSArrayControllers. I'll use the 'Core Recipe' paradigm here.
I want to be able to display a NSPopupButton (Recipe) that is the
master entity controlling the table of ingredients.
The elements of the NSTableView are dependent on the NSPopupButton.
Scenario:
Entities (NSManagedObjects):
Recipe : Ingredients (1:many).
Recipe <-- NSPopupButton
Cake
Lasagna
Ingredients <-- NSTableView
Flour {cake}
Eggs {cake}
Noodles {Lasagna}
Tomatoes {Lasagna}
Two NSArrayControllers: 'Recipe' Array and 'Ingredient' Array
Both fields use the NSManagedObjectContext for their parameters.
------------
Outcome: I have independent fields that list their respective entity
contents (i.e., I can choose whatever recipe without regard to
ingredients, and vice-versa).
That's not what I want. Changing the recipe
should also change the ingredients.
Question: How do I link the Recipe with its associated Ingredients
per Entity-Relationship diagram so that only the ingredients are
displayed per recipe?
In short, how do I make the Ingredient Controller dependent on the
Recipe Controller?
Regards,
Ric.
_______________________________________________
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