File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,17 @@ extension BaseCoreDataStack {
4545 // ensure viewContext receives changes from saves of backgroundContext
4646 container. viewContext. automaticallyMergesChangesFromParent = true
4747
48+ // in-memory changes will win any conflict
49+ container. viewContext. mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
50+
51+ // use generational querying, where this context will pin itself to the generation of the database when it first loads data
52+ // NOTE not used until more research is done on whether it's needed
53+ // do {
54+ // try container.viewContext.setQueryGenerationFrom(.current)
55+ // } catch {
56+ // logger.error("\(#function) setQueryGenerationFrom ERROR \(error)")
57+ // }
58+
4859 // NOTE: the following is necessary to fully initialize the development container(s)
4960 // so that a complete deployment to production is possible in CloudKit dashboard.
5061 // NOTE: Both containers need to be deployed to production.
You can’t perform that action at this time.
0 commit comments