• 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 Implementation question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Core Data Implementation question
      • From: Charilaos Skiadas <email@hidden>
  • Prev by Date: What am I doing wrong in my drag loop? Dragging jumps all over the place.
  • Next by Date: Re: What am I doing wrong in my drag loop? Dragging jumps all over the place.
  • Previous by thread: Re: What am I doing wrong in my drag loop? [solved]
  • Next by thread: Re: Core Data Implementation question
  • Index(es):
    • Date
    • Thread