Respect the root keyPath when constructing a temporary object mapping provider. Covers the case where an object mapping targeting nested content is being directly specified.

This commit is contained in:
Blake Watters
2011-07-02 11:04:56 -04:00
parent 213ad291b6
commit 546eb627cd
5 changed files with 29 additions and 11 deletions

View File

@@ -407,8 +407,6 @@
nil];
error = [NSError errorWithDomain:RKRestKitErrorDomain code:RKRequestBaseURLOfflineError userInfo:userInfo];
[self didFailLoadWithError:error];
// TODO: Is this needed here? Or can we just return a nil response and everyone will be happy??
response = [[[RKResponse alloc] initWithSynchronousRequest:self URLResponse:URLResponse body:payload error:error] autorelease];
}
}

View File

@@ -61,8 +61,6 @@ extern NSString* cacheURLKey;
- (id)initWithSynchronousRequest:(RKRequest*)request URLResponse:(NSHTTPURLResponse*)URLResponse body:(NSData*)body error:(NSError*)error {
self = [super init];
if (self) {
// TODO: Does the lack of retain here cause problems with synchronous requests, since they
// are not being retained by the RKRequestQueue??
_request = request;
_httpURLResponse = [URLResponse retain];
_failureError = [error retain];