title: JPA/Hibernate "Composite-id class does not override equals()"
body: <p>I'm using JPA and getting the following warning. I've researched this, and understand why I need to override it and how Hibernate uses these methods.  I still have a question though:</p>
  
  <p><strong>Exception:</strong></p>
  
  <blockquote>
    <p>Composite-id class does not override equals()</p>
  </blockquote>
  
  <p><strong>Question:</strong></p>
  
  <p>Why does Hibernate only care about classes that don't have composite IDs? Does it by default compare on the <code>@Id</code> field if there is only one present, or is there something more complex going on here?</p>