mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-21 10:54:31 +08:00
Incorporate code review feedback
This commit is contained in:
committed by
Blake Watters
parent
1cd22d5b33
commit
32ab17fe0b
@@ -60,9 +60,8 @@
|
||||
|
||||
NSMutableDictionary *cachedObjectsForEntity = [_entityCache objectForKey:entity.name];
|
||||
if (cachedObjectsForEntity == nil) {
|
||||
cachedObjectsForEntity = [self cacheObjectsForEntity:entity
|
||||
withMapping:mapping
|
||||
inContext:managedObjectContext];
|
||||
[self cacheObjectsForEntity:entity withMapping:mapping inContext:managedObjectContext];
|
||||
cachedObjectsForEntity = [_entityCache objectForKey:entity.name];
|
||||
}
|
||||
return cachedObjectsForEntity;
|
||||
}
|
||||
@@ -91,9 +90,9 @@
|
||||
return object;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)cacheObjectsForEntity:(NSEntityDescription *)entity
|
||||
withMapping:(RKManagedObjectMapping *)mapping
|
||||
inContext:(NSManagedObjectContext *)managedObjectContext {
|
||||
- (void)cacheObjectsForEntity:(NSEntityDescription *)entity
|
||||
withMapping:(RKManagedObjectMapping *)mapping
|
||||
inContext:(NSManagedObjectContext *)managedObjectContext {
|
||||
NSAssert(entity, @"Cannot cache objects without an entity");
|
||||
NSAssert(mapping, @"Cannot cache objects without a mapping");
|
||||
NSAssert(managedObjectContext, @"Cannot cache objects without a managedObjectContext");
|
||||
@@ -125,8 +124,6 @@
|
||||
selector:@selector(objectsDidChange:)
|
||||
name:NSManagedObjectContextObjectsDidChangeNotification
|
||||
object:managedObjectContext];
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
- (void)cacheObject:(NSManagedObject *)managedObject withMapping:(RKManagedObjectMapping *)mapping inContext:(NSManagedObjectContext *)managedObjectContext {
|
||||
|
||||
Reference in New Issue
Block a user