• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data: Master-Detail question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Core Data: Master-Detail question
      • From: Matt Ronge <email@hidden>
  • Prev by Date: Zero kb file copied
  • Next by Date: Re: Core Data: Master-Detail question
  • Previous by thread: Re: Zero kb file copied
  • Next by thread: Re: Core Data: Master-Detail question
  • Index(es):
    • Date
    • Thread