Re: Core Data: stop object from firing fault?
Re: Core Data: stop object from firing fault?
- Subject: Re: Core Data: stop object from firing fault?
- From: Mike Abdullah <email@hidden>
- Date: Fri, 01 Jul 2011 01:10:40 +0100
On 30 Jun 2011, at 23:01, Michael Link wrote:
> Is there anyway to stop an NSManagedObject from firing a fault, say because it's actually been deleted?
>
> For instance if an object is created on the main thread and is then punted to a background thread and deleted (in a separate context of course) then the changes are merged back to the main thread, the reference on the main thread shows it's now a fault, but not that it's deleted. If the object fires its fault then of course an exception is raised.
>
> Does anyone know a way to change this behavior so that you can test if an object is invalid?
In this scenario your object should match the combo of -isFault and (managedObjectContext == nil)
_______________________________________________
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