title: Is there a good way to update an NSManagedObject when relationships change?
body: <p>This is a simplified version of my scenario, but that's OK.</p>
  
  <p>Let's say you have three CoreData entities, each with a corresponding subclass of NSManagedObject, and 1-to-1 relationships as follows:</p>
  
  <p>Person -> ContactRecord -> PhoneNumber</p>
  
  <p>The Person entity has a vcard attribute, which holds the vCard data for that person in a string.</p>
  
  <p>The PhoneNumber entity has two attributes: the actual number, and the type of phone number (cell, home, work, etc).</p>
  
  <p>Right now, in the Person <code>willSave</code> method, I'm updating the vcard property. This works fine, if another property on the Person object has changed. But, if I change the type or number on the PhoneNumber object, or any properties on the ContactRecord, the <code>willSave</code> method isn't called on the Person object.</p>
  
  <p>Is there a good way to update the Person object when a property changes over on the PhoneNumber object?</p>
  
  <p>Right now, the best option I see is using NSManagedObjectContextWillSaveNotification. The method called by that notification could sift through the changed objects and work back up the inverse relationships to call some method on the Person object, but this happens after the NSManagedObjectContext has already saved, so it would require another save after that. My hope was to set this property to the correct value before the save happens.</p>