Re: CoreData relationships in IB
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