After reading this article , bending towards not overriding equals () and hashCode () in general.
In the summary of this article regarding no eq / hC in all columns, the only consequence is that I could not perform comparison operations, such as:
- contains () in the list for individual objects or
- Compare the same objects from different sessions.
and expect the correct result.
But I still doubt and would like to talk about your experience, be it a bad practice to skip the equals and hashCode values ββin general and what other consequences that I still don't know about.
Another point of information that bends to the use of collection lists over the set. And my assumption is that I really don't need to redefine hashCode and equal when stored in a list.
source
share