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

Try to use Equatable for the user models #2

Open
AYM1607 opened this issue Feb 25, 2019 · 1 comment
Open

Try to use Equatable for the user models #2

AYM1607 opened this issue Feb 25, 2019 · 1 comment

Comments

@AYM1607
Copy link
Owner

AYM1607 commented Feb 25, 2019

The models use named constructors and the code necessary to make it work with Equatable is too verbose and unnecessary. This is because the call to the super constructor (Equatable) complains when accessing non static members.

sticking to overriding hashCode and the == operator for now.

@AYM1607
Copy link
Owner Author

AYM1607 commented Feb 25, 2019

overriding the operators seemed like a good idea. However, some models have attributes of non primitive types, this causes the equality check to fail even with the overrode operators.

Would be helpful to find out if equatable handles this situations well.

If it does, the best option is to move to it even if the code is a little more verbose.

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

No branches or pull requests

1 participant