You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Ryan Cornia <rc...@myriad.com> on 2008/01/23 19:24:24 UTC

Best practice for implementing equals and hashcode with JPA?

I am curious how others are implementing equals/hashcode with OpenJPA.

I am using property level annotations, so found the reflective EqualsBuilder
from Apache didn't work.

Are you writing each equals by hand? Do you include all fields, or just the
key fields? 

Anyone have an example of how they do equals they could send me?

Thanks!
Ryan