Skip to content

Commit

Permalink
Log the name of the entity during failure to connect relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Apr 4, 2012
1 parent 212c243 commit 67d5cf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/CoreData/RKManagedObjectMappingOperation.m
Expand Up @@ -56,7 +56,7 @@ - (void)connectRelationship:(NSString *)relationshipName {
RKLogWarning(@"Can only connect relationships for RKObjectMapping relationships. Found %@: Skipping...", NSStringFromClass([mapping class]));
return;
}
RKObjectMapping* objectMapping = (RKObjectMapping*)mapping;
RKManagedObjectMapping *objectMapping = (RKManagedObjectMapping *) mapping;
NSAssert(relationshipMapping, @"Unable to find relationship mapping '%@' to connect by primaryKey", relationshipName);
NSAssert([relationshipMapping isKindOfClass:[RKObjectRelationshipMapping class]], @"Expected mapping for %@ to be a relationship mapping", relationshipName);
NSAssert([relationshipMapping.mapping isKindOfClass:[RKManagedObjectMapping class]], @"Can only connect RKManagedObjectMapping relationships");
Expand All @@ -77,7 +77,7 @@ - (void)connectRelationship:(NSString *)relationshipName {
if (relatedObject) {
RKLogDebug(@"Connected relationship '%@' to object with primary key value '%@': %@", relationshipName, valueOfLocalPrimaryKeyAttribute, relatedObject);
} else {
RKLogDebug(@"Failed to find object to connect relationship '%@' with primary key value '%@'", relationshipName, valueOfLocalPrimaryKeyAttribute);
RKLogDebug(@"Failed to find instance of '%@' to connect relationship '%@' with primary key value '%@'", [[objectMapping entity] name], relationshipName, valueOfLocalPrimaryKeyAttribute);
}
RKLogTrace(@"setValue of %@ forKeyPath %@", relatedObject, relationshipName);
[self.destinationObject setValue:relatedObject forKeyPath:relationshipName];
Expand Down

0 comments on commit 67d5cf0

Please sign in to comment.