浏览代码

Remove automaticallyMergesChangesFromParent from background context method

Marvin Polscheit 2 月之前
父节点
当前提交
c753e7173c
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      Model/CoreDataStack.swift

+ 0 - 2
Model/CoreDataStack.swift

@@ -103,8 +103,6 @@ class CoreDataStack: ObservableObject {
         /// - Tag: newBackgroundContext
         /// - Tag: newBackgroundContext
         let taskContext = persistentContainer.newBackgroundContext()
         let taskContext = persistentContainer.newBackgroundContext()
 
 
-        /// ensure that the background contexts stay in sync with the main context
-        taskContext.automaticallyMergesChangesFromParent = true
         taskContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
         taskContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
         taskContext.undoManager = nil
         taskContext.undoManager = nil
         return taskContext
         return taskContext