Updates comments on inferMappingsFromObjectTypes and add documentation to the Object Mapping document. Defaulted it to off

as it can complicate things for KVC mappable data.
This commit is contained in:
Blake Watters
2011-07-24 12:28:42 -04:00
parent 3a5354c4a0
commit a0cb33d391
3 changed files with 22 additions and 3 deletions

View File

@@ -172,7 +172,14 @@ typedef enum {
When YES, RestKit will auto-select the appropriate object mapping for a particular object
passed through getObject:, postObject:, putObject:, and deleteObject:.
Default: YES
This is useful when you are working with mappable data that is not identifiable via KVC
and you are sending/receiving objects of the same type. When YES, RestKit will search the
mappingProvider for an object mapping targeting the same type of object that you passed into
getObject:, postObject:, :putObject, or deleteObject: and configure the RKObjectLoader to map
the payload using that mapping. This is merely a convenience for users who are working entirely
with non-KVC mappable data and saves the added step of searching the mapping provider manually.
Default: NO
*/
@property (nonatomic, assign) BOOL inferMappingsFromObjectTypes;

View File

@@ -39,7 +39,7 @@ static RKObjectManager* sharedManager = nil;
_router = [RKObjectRouter new];
_client = [[RKClient clientWithBaseURL:baseURL] retain];
_onlineState = RKObjectManagerOnlineStateUndetermined;
_inferMappingsFromObjectTypes = YES;
_inferMappingsFromObjectTypes = NO;
self.acceptMIMEType = RKMIMETypeJSON;
self.serializationMIMEType = RKMIMETypeFormURLEncoded;