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:
Exception:
Composite-id class does not override equals()
Question:
Why does Hibernate only care about classes that don't have composite IDs? Does it by default compare on the @Id
field if there is only one present, or is there something more complex going on here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…