mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-14 23:28:07 +08:00
Apply rootKeyPath within the mapper rather than the object loader
This commit is contained in:
@@ -334,7 +334,9 @@
|
||||
} else if ([mappingsForContext conformsToProtocol:@protocol(RKObjectMappingDefinition)]) {
|
||||
id mappableData = self.sourceObject;
|
||||
if ([mappingsForContext respondsToSelector:@selector(rootKeyPath)] && [mappingsForContext rootKeyPath] != nil) {
|
||||
mappableData = [self.sourceObject valueForKeyPath:[mappingsForContext rootKeyPath]];
|
||||
NSString* rootKeyPath = [mappingsForContext rootKeyPath];
|
||||
mappableData = [self.sourceObject valueForKeyPath:rootKeyPath];
|
||||
RKLogDebug(@"Selected object mapping has rootKeyPath. Apply valueForKeyPath to mappable data: %@", rootKeyPath);
|
||||
}
|
||||
|
||||
if (mappableData) {
|
||||
|
||||
Reference in New Issue
Block a user