I suppose that in your equals you invoke getClass. I had the same problem. 
There is a Wiki on hibernate about equals and hashcode 
(http://www.hibernate.org/109.html).

For my entites, I never invoke getClass, I use a workaround to be sure not to 
have proxy. That's ugly, but I did not find something more elegant in javassist 
publi API.



  | public static Class getBaseClass(Class srcClass) {
  |     if (srcClass.getName().contains(CGLIB)
  |         || srcClass.getName().contains(JAVASSIST)) {
  |       return srcClass.getSuperclass();
  |     }
  |     return srcClass;
  | 
  |   }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071050#4071050

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071050
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to