Re: Core Data: Determine if managed object is deleted
Re: Core Data: Determine if managed object is deleted
- Subject: Re: Core Data: Determine if managed object is deleted
- From: Steve Steinitz <email@hidden>
- Date: Fri, 21 Oct 2011 22:42:24 +1100
Hi Jerry,
On 21 Oct 11, at 2:53pm, email@hidden wrote:
> In other words, they should have named that method -isDeletedForSure, to indicate that the NO result is not reliable.
Funny.
> Anyhow, today I fixed a problem by using this instead
>
> BOOL isDeleted ;
> isDeleted = [object isDeleted] || ([object managedObjectContext] == nil) ;
Another try:
isDeleted = [[[object managedObjectContext] deletedObjects] containsObject: object];
That aside, Quincey's essay makes sense.
Cheers,
Steve
_______________________________________________
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