My consulting clients and people in my workshops and conference talks ask me all the time about these two methods. So, let’s answer these questions once and for all in this video.
But before we start, if this is your first time here, and you want to learn how to create your entity mappings with ease, build incredible efficient persistence layers with Hibernate and all types of other Java persistence related stuff, start now by subscribing and clicking the bell, so you don't miss anything.
OK, let’s get into today’s topic.
The implementation of the equals() and hashCode() methods for entity classes is an often discussed question.
Do you really need them? There are lots of applications that work perfectly fine using Java’s default methods provided by the Object class.
And if you need to implement them, how should you do that? Should you use all attributes or just the primary keys?
If you like this video, please give me your thumbs up and share it with your friends and co-workers.
Like my channel? Subscribe!
➜
Join the free Member Library:
Read the accompanying post:
Want to connect with me?
Blog:
Twitter:
Facebook:
#hashcode #equals #JPA #hibernate
0 Comments