It is not directly obvious why you should override and implement equals() and hashCode() in Hibernate. Here are two good documentation for why:
- Hibernate ORM documentation
http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch04.html#persistent-classes-equalshashcode
JBoss Community Wiki
https://community.jboss.org/wiki/EqualsAndHashCode
No comments:
Post a Comment