Binding to to-one relationship
Binding to to-one relationship
- Subject: Binding to to-one relationship
- From: Jeff LaMarche <email@hidden>
- Date: Thu, 5 Jan 2006 21:44:41 -0500
Okay, I've got an entity with a to-one relationship to another
entity. So, for example, I have a Person entity with a to-one
relationship called primaryPhone to a PhoneNumber entity. The Person
entities are being managed by an array controller and I'm currently
connecting buttons directly to the array controller's add: action to
create new Person entities. I want to display the phone number fields
right along with the other fields from the selected Person entity
using a keypath primaryPhone.number for example.
Only problem is, the PhoneNumber entity is never getting created, so
any values entered into the phone number fields aren't going
anywhere. Is there a way to have it automatically create the
PhoneNumber entity when the array controller inserts a new Person
entity, or do I have to use a custom method for adding objects and
manually creates the PhoneNumber entity and sticks it in the to-one
relationship?
Thanks much,
Jeff
_______________________________________________
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