-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
replaced 31 with getClass().hashCode() for Entity hashCode #13097
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please let me add a comment in the code before merging. |
@pblanchardie Can you please add the comment so we can merge it? |
Thanks @pblanchardie for the contribution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
replaced 31 with getClass().hashCode() for Entity hashCode
Missing unit tests here |
Use
getClass().hashCode()
instead of31
as Entity hashCode, as mentioned in #10097 (initially #8656).I noticed that @Shaolans copied this implementation to
EntityDTO.hashCode
(commit 6a66c40), so I also updated it even if I'm not sure why it absolutely needs to be aligned, as DTOs don't have the same constraints as JPA Entities regarding equals and hashCode.Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.