mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 09:33:41 +08:00
Configure RKManagedObjectImporter to set the mapper operation instance as the parent operation for the RKManagedObjectMappingOperationDataSource instance. This enables relationship connection between objects that are created without an intervening save.
This commit is contained in:
@@ -215,6 +215,7 @@
|
||||
NSDictionary *mappingDictionary = @{ (keyPath ?: [NSNull null]) : mapping };
|
||||
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithRepresentation:parsedData mappingsDictionary:mappingDictionary];
|
||||
mapper.mappingOperationDataSource = self.mappingOperationDataSource;
|
||||
self.mappingOperationDataSource.parentOperation = mapper;
|
||||
__block RKMappingResult *mappingResult;
|
||||
[self.managedObjectContext performBlockAndWait:^{
|
||||
[mapper start];
|
||||
|
||||
Reference in New Issue
Block a user