Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:yfactorial/objectiveresource
Browse files Browse the repository at this point in the history
  • Loading branch information
vickeryj committed Feb 17, 2009
2 parents 99df799 + 2c1044a commit 20fbdf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/lib/NSObject+ObjectiveResource.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ - (NSString *)convertToRemoteExpectedType {
#pragma mark default equals methods for id and class based equality
- (BOOL)isEqualToRemote:(id)anObject {
return [NSStringFromClass([self class]) isEqualToString:NSStringFromClass([anObject class])] &&
[anObject respondsToSelector:@selector(getRemoteId)] && [[anObject getRemoteId] isEqualToString:[self getRemoteId]];
[anObject respondsToSelector:@selector(getRemoteId)] && [[anObject getRemoteId]isEqualToString:[self getRemoteId]];
}
- (NSUInteger)hashForRemote {
return [[self getRemoteId] intValue] + [NSStringFromClass([self class]) hash];
Expand All @@ -177,6 +177,9 @@ - (id)getRemoteId {
SEL idMethodSelector = NSSelectorFromString([self getRemoteClassIdName]);
if ([self respondsToSelector:idMethodSelector]) {
result = [self performSelector:idMethodSelector];
if ([result respondsToSelector:@selector(stringValue)]) {
result = [result stringValue];
}
}
return result;
}
Expand Down

0 comments on commit 20fbdf6

Please sign in to comment.