Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile RBQFetchResultController with #64

Closed
jasper-ch-chan opened this issue Jan 28, 2016 · 6 comments
Closed

Unable to compile RBQFetchResultController with #64

jasper-ch-chan opened this issue Jan 28, 2016 · 6 comments

Comments

@jasper-ch-chan
Copy link

Has anyone encountered the error "Multiple methods named 'hash' found with mismatched set, parameter type or attributes" in the RBQSafeRealmObject.m file? I've had to comment out the function

(NSUInteger)hash
{
    return [_primaryKeyValue hash];
}

to get the code to compile

@bigfish24
Copy link
Contributor

Commenting this out will break things. Any chance you could provide me with your project privately to debug? I haven't encountered this error, so it is probably related to the installation or some conflict with Cocoapods assuming you installed that way.

@bigfish24
Copy link
Contributor

Also, if you have commented this out, then this is likely the reason why you are not seeing any changes reported in this issue: #63

@jasper-ch-chan
Copy link
Author

@bigfish24 I think the problem is because there are other functions (namely my thrift API) that uses the method name hash, and since _primaryKeyValue is of type id, it can mean any of them. Would it be alright to change it to RLMObject type instead of id?

@bigfish24
Copy link
Contributor

@jasper-ch-chan no it does need to be id because the primary key value can be NSString or NSNumber since Realm supports indexes on strings and integers.

@bigfish24
Copy link
Contributor

Are you sure you are not conflicting with hash which is a method on NSObject in your code for the thrift API?

@jasper-ch-chan
Copy link
Author

So when I command click on the hash function, it shows all the hash functions it finds. NSObject is one of them, but it also lists out all the other hash functions in our API file. Is there another way to get around this?

Edit: Another way to phrase it is, if I know my primary key for all objects is always long long, can I change it from id to long long?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants