Updates to entity cache and other components to operate in parent/child context world.

This commit is contained in:
Blake Watters
2012-07-20 14:44:48 -04:00
parent e952f451fb
commit 6b315fbd54
13 changed files with 290 additions and 173 deletions

View File

@@ -98,6 +98,11 @@
}
}
if (! self.managedObjectCache) {
RKLogWarning(@"Performing managed object mapping with a nil managed object cache:\n"
"Unable to update existing object instances by primary key. Duplicate objects may be created.");
}
// If we have found the primary key attribute & value, try to find an existing instance to update
if (primaryKeyAttribute && primaryKeyValue && NO == [primaryKeyValue isEqual:[NSNull null]]) {
object = [self.managedObjectCache findInstanceOfEntity:entity