mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-01 22:42:51 +08:00
* Removed RestKit from inheritance hierarchy * Mappings are implemented as concrete classes * Mapper is much more flexible & powerful * Much more robust error handling * Serialization is reimplemented as an object mapping operation * Added ability to serialize to JSON natively * Reworked Core Data integration * Simplified the codebase substantially
27 lines
733 B
Objective-C
27 lines
733 B
Objective-C
//
|
|
// RKObjectRelationshipMapping.m
|
|
// RestKit
|
|
//
|
|
// Created by Blake Watters on 5/4/11.
|
|
// Copyright 2011 Two Toasters. All rights reserved.
|
|
//
|
|
|
|
#import "RKObjectRelationshipMapping.h"
|
|
|
|
@implementation RKObjectRelationshipMapping
|
|
|
|
@synthesize objectMapping = _objectMapping;
|
|
|
|
+ (RKObjectRelationshipMapping*) mappingFromKeyPath:(NSString*)sourceKeyPath toKeyPath:(NSString*)destinationKeyPath objectMapping:(RKObjectMapping*)objectMapping {
|
|
RKObjectRelationshipMapping* mapping = (RKObjectRelationshipMapping*) [self mappingFromKeyPath:sourceKeyPath toKeyPath:destinationKeyPath];
|
|
mapping.objectMapping = objectMapping;
|
|
return mapping;
|
|
}
|
|
|
|
- (void)dealloc {
|
|
[_objectMapping release];
|
|
[super dealloc];
|
|
}
|
|
|
|
@end
|