Core Data Implementation question
Core Data Implementation question
- Subject: Core Data Implementation question
- From: "Marcus S. Zarra" <email@hidden>
- Date: Wed, 20 Jul 2005 11:03:26 -0600
I am trying to figure out the best way to approach this issue with Core
Data.
I have a parent object that has a to-many relationship with a child object.
The child has a to-one relationship with the parent.
Parent <-->> Child
Adding new children works correctly and the GUI (which displays the children
in a table) works perfectly.
The problem comes in with a couple of attributes in the parent. The parent
has a couple of values that are changed based on the children. The children
are added progammatically and I need a way to notify any observers that the
parent attributes have changed when I add the child. I have tried doing the
following:
[parent willChangeValueForKey:@"xxx"];
//add child
[parent didChangeValueForKey:@"xxx"];
but this seems to mess up the actual update of the child.
Does anyone know of a cleaner way to get this to work? Note that the parent
attribute "xxx" is a calculated value in the parent object and not a value
stored in the core data repository.
Thanks for any insight.
Marcus S. Zarra
_______________________________________________
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