-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Exclude properties from being considered regarding equality #57
Comments
I like that idea quite a bit. I would suggest hacking and sending a pull request, code is always better than a suggestion 😄 |
I'm playing with this and a few other additions in a project I'm working on. I'll see how well they stand up to use, and if they work OK I'll look into contributing. |
Exactly the reason a pull request is always preferred. I'm going to close this in the anticipation of a future pull request. Would love to see what you come up with! |
I know this just got closed, but if a pull request is going to be created, I suggest the method be made inverse. Perhaps |
I think this should be handled with an application-level override of
In this particular case, it sounds like you would want to exclude those properties from most things, including copying and archiving. That can be done with a |
Suppose I have some properties that hold cached data — stuff that can be derived but at a time penalty, so I'm cacheing it in the model. I'd like to exclude such properties from equality calculations. Perhaps there should be a method
+(NSSet*)keypathsToExcludeFromEquality
that you can override to easily exclude them?I love that object equality is handled for me by default. It'd be even better if it was customisable in this manner!
The text was updated successfully, but these errors were encountered: