Equals and HashCode | Hibernate | JBoss Community - 0 views
-
best strategies for implementation of equals() and hashcode() in your persistent classes
-
The general contract is: if you want to store an object in a List, Map or a Set then it is an requirement that equals and hashCode are implemented so they obey the standard contract as specified in the documentation
-
Why are equals() and hashcode() importantNormally, most Java objects provide a built-in equals() and hashCode() based on the object's identity; so each new() object will be different from all others.
- ...8 more annotations...