Entities equals() - hashcode() - toString(). How to correctly implement them?

Posted by spike07 on Stack Overflow See other posts from Stack Overflow or by spike07
Published on 2010-03-15T11:05:48Z Indexed on 2010/03/15 11:09 UTC
Read the original article Hit count: 186

Filed under:
|
|
|
|

I'm implementing equals() - hashcode() - toString() of my Entities using all the available fields in the bean.
I'm getting some Lazy init Exception on the frontend when I try to compare the equality or when I print the obj state. That's because some list in the entity can be lazy initialized.
I'm wondering what's the correct way to for implementing equals() and toString() on an Entity Obj

© Stack Overflow or respective owner

Related posts about java

Related posts about entity