Skip to content

Synchronized objects and delete all objects of entity

Latest
Compare
Choose a tag to compare
@davebcn87 davebcn87 released this 27 Jun 08:46
· 40 commits to develop since this release

Sync objects from array

This way you can delete all the elements in the database of the importing entity, except the ones you are importing now.

Can be useful when using LFSCoreData as a cache of your data and this data is volatile.

The usage is like this:

[Tweet importFromArray:yourArrayOfNewObjects
             inContext:[[LFSDataModel sharedModel] mainContext]
    deleteOtherObjects:YES];

Delete all objects of an entity

Now you can delete all objects for an specific entity like this:

[Tweet deleteAllObjects];