Skip to content
Go to file
Cannot retrieve contributors at this time
51 lines (37 sloc) 737 Bytes

Deleting Entities

To delete a single entity in the default context:

// Objective-C
[myPerson MR_deleteEntity];
// Swift

To delete the entity from a specific context:

// Objective-C
[myPerson MR_deleteEntityInContext:otherContext];
// Swift
myPerson.mr_deleteEntity(in: otherContext)

To truncate all entities from the default context:

// Objective-C
[Person MR_truncateAll];
// Swift

To truncate all entities in a specific context:

// Objective-C
[Person MR_truncateAllInContext:otherContext];
// Swift
Person.mr_truncateAll(in: otherContext)
You can’t perform that action at this time.