RKObjectLoader should be set up with the object managers client, not the shared one.

This fixes support for apps using multiple baseURLs via multiple clients or managers.
This commit is contained in:
Jeremy Ellison
2011-01-13 13:41:52 -05:00
parent 7177c88182
commit 471a4ad137
3 changed files with 19 additions and 6 deletions

View File

@@ -48,6 +48,7 @@
NSString* _keyPath;
RKManagedObjectStore* _managedObjectStore;
NSManagedObjectID* _targetObjectID;
RKClient* _client;
}
/**
@@ -89,10 +90,12 @@
* Return an auto-released loader with with an object mapper, a request, and a delegate
*/
+ (id)loaderWithResourcePath:(NSString*)resourcePath mapper:(RKObjectMapper*)mapper delegate:(NSObject<RKObjectLoaderDelegate>*)delegate;
+ (id)loaderWithResourcePath:(NSString*)resourcePath client:(RKClient*)client mapper:(RKObjectMapper*)mapper delegate:(NSObject<RKObjectLoaderDelegate>*)delegate;
/**
* Initialize a new object loader with an object mapper, a request, and a delegate
*/
- (id)initWithResourcePath:(NSString*)resourcePath mapper:(RKObjectMapper*)mapper delegate:(NSObject<RKObjectLoaderDelegate>*)delegate;
- (id)initWithResourcePath:(NSString*)resourcePath mapper:(RKObjectMapper*)mapper delegate:(NSObject<RKObjectLoaderDelegate>*)delegate;
- (id)initWithResourcePath:(NSString*)resourcePath client:(RKClient*)client mapper:(RKObjectMapper*)mapper delegate:(NSObject<RKObjectLoaderDelegate>*)delegate;
@end