This page also needs to address proxies, which were the cause of most of
the discussion on this thread:
http://forum.hibernate.org/viewtopic.php?t=928172
Two very important conclusions came out of that thread: (1) you *must*
override eq/hc to use proxies, even if you don't mix objects from
different sessions, and (2) there is no way to cause eq/hc *not* to
inflate proxies, even if you're using a synthetic PK as the basis of
comparison. |