• 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
Re: CoreData relationships in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData relationships in IB


  • Subject: Re: CoreData relationships in IB
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 22 May 2005 17:38:26 -0700

On May 22, 2005, at 11:44 AM, T Reaves wrote:
I have a UI setup to display and edit CoreData objects. I have ObjectA and ObjectB; ObjectA contains an ObjectB.

Just a point of information: Your ObjectA entity has a to-one relationship to an ObjectB entity. This may be how you're modeling containment, but it's important to understand that you're modeling containment via a relationship.


It does not appear that CoreData and the object controllers can instantiate the instance of ObjectB when objectB.field is set. Is this correct? Do I have to go ahead and create .h & .m files for my objects, and do the initialization of the contained objects there?

Yes, you can generate a subclass of NSManagedObject for your ObjectA entity and create the always-related entity there. You'd probably want to do this in -awakeFromInsert.


  -- Chris

_______________________________________________
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


References: 
 >CoreData relationships in IB (From: T Reaves <email@hidden>)

  • Prev by Date: "Reveal Drawer" button in title bars
  • Next by Date: Re: Subclassing NSManagedObject
  • Previous by thread: Re: CoreData relationships in IB
  • Next by thread: Scroll bars in combo boxes
  • Index(es):
    • Date
    • Thread