• 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
Re: core data - delete of object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core data - delete of object.


  • Subject: Re: core data - delete of object.
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 17 Nov 2008 23:38:40 -0800

On Nov 17, 2008, at 22:54, John Clayton wrote:

I'm basically looking to restore some state on an object at time of deletion, e.g.

if A is associated with B via a to-many relationship from A->B, then when one instance of B is deleted - we need to change a property on A.


If a B is delete, what causes it to be removed from the A->B relationship? If B's delete rule is set to "nullify" then it's automatically removed from the relationship. Otherwise, you must be doing something explicit to remove the deleted B from the relationship, yes?

Either way, it sounds like you what *really* want is to know when a B is removed from the relationship. If so, you could have A observe its relationship property, and recalculate the dependent property when you get a KVO notification.

That would mean you'd also do the recalculation when you remove a non- deleted B from the relationship (if that ever happens, but if it does you may not care).


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >core data - delete of object. (From: John Clayton <email@hidden>)
 >Re: core data - delete of object. (From: Jim Correia <email@hidden>)
 >Re: core data - delete of object. (From: John Clayton <email@hidden>)

  • Prev by Date: Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
  • Next by Date: Re: NSDateFormatter strangeness
  • Previous by thread: Re: core data - delete of object.
  • Next by thread: Re: core data - delete of object.
  • Index(es):
    • Date
    • Thread