Files
RestKit/Code/ObjectMapping/RKObject.m
Peter Marks 35171084d1 [Story #11961455] Implements support for sending nested objects back to the remote server for processing:
* Introduce RKObjectMappable#relationshipsToSerialize to define nested relationships to post
* New helper methods for working with relationship serializations.
* Extended Rails router to serialize nested objects according to Rails idioms
2011-04-05 22:18:10 -04:00

39 lines
703 B
Objective-C

//
// RKObject.m
// RestKit
//
// Created by Blake Watters on 7/20/10.
// Copyright 2010 Two Toasters. All rights reserved.
//
#import "RKObject.h"
@implementation RKObject
+ (NSDictionary*)elementToPropertyMappings {
[self doesNotRecognizeSelector:_cmd];
return nil;
}
+ (NSArray*)relationshipsToSerialize {
return [NSArray array];
}
+ (NSDictionary*)elementToRelationshipMappings {
return [NSDictionary dictionary];
}
+ (id)object {
return [[self new] autorelease];
}
- (NSDictionary*)propertiesForSerialization {
return RKObjectMappableGetPropertiesByElement(self);
}
- (NSDictionary*)relationshipsForSerialization {
return RKObjectMappableGetRelationshipsByElement(self);
}
@end