changed concurrency architecture. Transactions are now done on a direct child context of the root saving context (instead of a main context child)

This commit is contained in:
John Rommel Estropia
2015-03-05 21:31:38 +08:00
parent 1fae78434f
commit e64fc3d2d8
4 changed files with 25 additions and 10 deletions

View File

@@ -54,7 +54,7 @@ internal extension NSManagedObjectContext {
context.parentContext = self
context.parentStack = self.parentStack
context.setupForHardcoreDataWithContextName("com.hardcoredata.temporarycontext")
context.shouldCascadeSavesToParent = (self.concurrencyType == .MainQueueConcurrencyType)
context.shouldCascadeSavesToParent = (self.parentStack?.rootSavingContext == self)
return context
}