Skip to main content
edited tags
Link
MPelletier
  • 16.8k
  • 18
  • 89
  • 140
Source Link

Delete entity in core data

I am trying to delete an entity in core data.

I use the following code:

        //update core data
        [context deleteObject:myEntity];
        [myEntity deleteInContext:context];
        
        [context save:&error];

So far I know that actually one of the delete lines should do the job, however none of them does. Nothing happens at all. No error message. Nothing happens. context is my NSManagedObjectContext.

Can anyone help me? Thank you!!!!!