Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #250 from blackgold9/ios5Fixes

Obtain permanent IDs on inserted objects before saving
  • Loading branch information...
commit dffde9fe62f6406ba708394792f1c85c248fe690 2 parents 5915f5c + 578f4b8
@blackgold9 blackgold9 authored
View
2  MagicalRecord/Core/MagicalRecordNestedContextsPersistenceStrategy.m
@@ -17,6 +17,8 @@ - (void)setUpContextsWithCoordinator:(NSPersistentStoreCoordinator *)coordinator
NSManagedObjectContext *defaultContext = [NSManagedObjectContext MR_newMainQueueContext];
[defaultContext setParentContext:rootContext];
[NSManagedObjectContext MR_setDefaultContext:defaultContext];
+ [NSManagedObjectContext MR_makeContextObtainPermanentIDsBeforeSaving:defaultContext];
+ [NSManagedObjectContext MR_makeContextObtainPermanentIDsBeforeSaving:rootContext];
[NSManagedObjectContext MR_makeContext:rootContext mergeChangesToContext:defaultContext];
}
View
3  MagicalRecord/Core/MagicalRecordParallelStoresPersistenceStrategy.m
@@ -33,7 +33,8 @@ - (void)setUpContextsWithCoordinator:(NSPersistentStoreCoordinator *)coordinator
// Use the coordinator passed in
[defaultContext setPersistentStoreCoordinator:coordinator];
[NSManagedObjectContext MR_setDefaultContext:defaultContext];
-
+ [NSManagedObjectContext MR_makeContextObtainPermanentIDsBeforeSaving:defaultContext];
+ [NSManagedObjectContext MR_makeContextObtainPermanentIDsBeforeSaving:rootContext];
[NSManagedObjectContext MR_makeContext:rootContext mergeChangesToContext:defaultContext];
[NSManagedObjectContext MR_makeContext:defaultContext mergeChangesToContext:rootContext];
}
Please sign in to comment.
Something went wrong with that request. Please try again.