The problem is nothing to do with proxies. AFAIR, there is no problem using
foo.equals(bar) with a default implementation of equals. (Even if foo and bar are
proxies.)
The problem is that == is an incorrect implementation of equals, since two nonidentical
objects with represent the same data (ie, the same row of the database) will not be equal.
This is nothing to do with Hibernate.
"business key" equality is the correct interpretation of equals() from a data
modelling perspective. It represents what the *user* thinks of as the "same
objects".
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023057#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...