fix: To one relationships, that have a nested destination keypath are not correctly mapped to JSON

This commit is contained in:
Christian Himmelsbach
2013-02-10 03:16:01 +01:00
committed by Blake Watters
parent 318f9659f6
commit 4c1d010e91

View File

@@ -599,7 +599,7 @@ static NSString * const RKMetadataKeyPathPrefix = @"@metadata.";
}
RKLogTrace(@"Mapped relationship object from keyPath '%@' to '%@'. Value: %@", relationshipMapping.sourceKeyPath, relationshipMapping.destinationKeyPath, destinationObject);
[self.destinationObject setValue:destinationObject forKey:relationshipMapping.destinationKeyPath];
[self.destinationObject setValue:destinationObject forKeyPath:relationshipMapping.destinationKeyPath];
} else {
if ([self.delegate respondsToSelector:@selector(mappingOperation:didNotSetUnchangedValue:forKeyPath:usingMapping:)]) {
[self.delegate mappingOperation:self didNotSetUnchangedValue:destinationObject forKeyPath:relationshipMapping.destinationKeyPath usingMapping:relationshipMapping];