mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-26 13:55:40 +08:00
Cleanup invalid arguments from method signature refactoring
This commit is contained in:
@@ -134,7 +134,7 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
{
|
||||
RKConnectionMapping *connectionMapping = [self mappingForConnection:mapping.relationshipName];
|
||||
NSAssert(connectionMapping == nil, @"Cannot add connect relationship %@ by primary key, a mapping already exists.", mapping.relationshipName);
|
||||
NSAssert(mapping.mapping, @"Attempted to connect relationship for keyPath '%@' without a relationship mapping defined.");
|
||||
NSAssert(mapping.mapping, @"Attempted to connect relationship '%@' without a relationship mapping defined.", mapping.relationshipName);
|
||||
NSAssert([mapping.mapping isKindOfClass:[RKManagedObjectMapping class]], @"Can only connect RKManagedObjectMapping relationships");
|
||||
[_connections addObject:mapping];
|
||||
}
|
||||
@@ -150,7 +150,7 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
- (void)connectRelationship:(NSString *)relationshipName withMapping:(RKObjectMappingDefinition *)objectOrDynamicMapping fromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath whenValueOfKeyPath:(NSString *)keyPath isEqualTo:(id)value
|
||||
{
|
||||
RKDynamicObjectMappingMatcher* matcher = [[RKDynamicObjectMappingMatcher alloc] initWithKey:keyPath value:value primaryKeyAttribute:sourceKeyPath];
|
||||
RKConnectionMapping* mapping = [RKConnectionMapping connectionMappingForRelationship:relationshipName fromKeyPath:sourceKeyPath toKeyPath:destinationKeyPath withMapping:matcher matcher:objectOrDynamicMapping];
|
||||
RKConnectionMapping* mapping = [RKConnectionMapping connectionMappingForRelationship:relationshipName fromKeyPath:sourceKeyPath toKeyPath:destinationKeyPath withMapping:objectOrDynamicMapping matcher:matcher];
|
||||
[self addConnectionMapping:mapping];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user