mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 02:11:26 +01:00
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:
@@ -60,7 +60,15 @@ internal extension NSManagedObject {
|
||||
if objectID.temporaryID {
|
||||
|
||||
var error: NSError?
|
||||
if !context.obtainPermanentIDsForObjects([self], error: &error) {
|
||||
var didSucceed: Bool?
|
||||
if let managedObjectContext = self.managedObjectContext {
|
||||
|
||||
managedObjectContext.performBlockAndWait {
|
||||
|
||||
didSucceed = managedObjectContext.obtainPermanentIDsForObjects([self], error: &error)
|
||||
}
|
||||
}
|
||||
if didSucceed != true {
|
||||
|
||||
HardcoreData.handleError(
|
||||
error ?? NSError(hardcoreDataErrorCode: .UnknownError),
|
||||
|
||||
Reference in New Issue
Block a user