Skip to content

Commit

Permalink
Set merge policy on managed object context when updating Core Data wi…
Browse files Browse the repository at this point in the history
…th datastore changes.
  • Loading branch information
Liron Yahdav committed Nov 10, 2014
1 parent d89df6d commit c05e287
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ParcelKit/PKSyncManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ - (BOOL)updateCoreDataWithDatastoreChanges:(NSDictionary *)changes error:(NSErro

NSManagedObjectContext *managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[managedObjectContext setPersistentStoreCoordinator:self.persistentStoreCoordinator];
[managedObjectContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];
[managedObjectContext setUndoManager:nil];

__weak typeof(self) weakSelf = self;
Expand Down

0 comments on commit c05e287

Please sign in to comment.