mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user