Re: Core Data To-Many Relationship KVO
Re: Core Data To-Many Relationship KVO
- Subject: Re: Core Data To-Many Relationship KVO
- From: Roland King <email@hidden>
- Date: Thu, 12 Feb 2015 07:51:26 +0800
> On 12 Feb 2015, at 07:27, Richard Charles <email@hidden> wrote:
>
> I have a Core Data in-memory store. There is a managed object which uses KVO on a to-many relationship property of itself.
>
> When an object at the other end of the relationship is deleted using [managedObjectContext deleteObject:object] the KVO change notification is not sent right away.
>
> What triggers or will trigger the KVO change notification?
>
> Richard Charles
>
committing the core data changes removes them from all the relationships and fires KVO changes. see propagatesDeletesAtEndOfEvent: and commitPendingChanges. In AppKit usually deletes are propagated once around the event loop, in other places they won’t propagate until there’s a save or commitPendingChanges: is called.
_______________________________________________
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