Fritz,
Thanks for the pointer,  I had over looked this document in my own search.  The 
issue was that I had deleted the record ok, but just a few lines further down I 
had referenced one of the fields of the deleted record... (only idiots do that! 
)  So the clue was from the document you pointed me to and specifically the 
line "Fail to break all relationships from other objects to that object."  So I 
went looking for a mistake like I found.

Once again thanks for your time

Regards
Damien

On 31/08/2010, at 10:41 AM, Fritz Anderson wrote:

> Googling "CoreData could not fulfill a fault" yields 
> <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html>
>  as the very first result; it took me three seconds to do this. 
> 
> You don't give enough information to say for sure, but can you tell us 
> whether the second cause for this error (not propagating the deletion into 
> relationships) fits your case?
> 
>       — F
> 
> 
> 
> On 30 Aug 2010, at 4:40 PM, Damien Cooke wrote:
> 
>> I have been deleting objects with code similar to this.
>> 
>>      NSManagedObjectContext *context = [[self fetchedResultsController] 
>> managedObjectContext];
>>      
>>      [context deleteObject:videoEntity];
>>      [managedObjectContext processPendingChanges];
>>      
>>      //commit the delete
>>      NSError *saveError = nil;
>>      if (![context save:&saveError]) 
>>      {
>>              NSLog(@"CoreData Failure");
>>      }else {
>>              //all good
>>              NSLog(@"CoreData delete success");
>>              NSLog(@"\n\nNumber of objects in store after delete: %d\n\n", 
>> [[self.fetchedResultsController fetchedObjects] count]);
>>      }
>> 
>> This works fine (as far as deleting the entry) however it crashes with a 
>> crash like that shown below:  I also saw a recommendation to add this:
>> 
>> - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller
>> {
>>      NSLog(@"controllerDidChangeContent");
>> } 
>> 
>> This seems to make no difference to the crash.
> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to