g*****g 发帖数: 34805 | 1 for hibernate?
if i check a.equals(b) in a hibernate session, if they have the same id,
the equation should always be true, right? Because the same object will not
be loaded twice in hibernate.
So I don't need to write equals and hashcode for domain object,
am I correct? | m******t 发帖数: 2416 | 2 There isn't a generic answer to this question - which is an ongoing debate.
In case you haven't read this, it would be a good start point to
understanding the whole "can of worms" 8-)
http://www.hibernate.org/109.html |
|