Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Deleting Entities

To delete a single entity in the default context:

// Objective-C
[myPerson MR_deleteEntity];
// Swift
myPerson.mr_deleteEntity()

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
Person.mr_truncateAll()

To truncate all entities in a specific context:

// Objective-C
[Person MR_truncateAllInContext:otherContext];
// Swift
Person.mr_truncateAll(in: otherContext)