The primary key class must define equals and hashCode methods. The semantics of value equality for these methods must be consistent with the database equality for the database types to which the key is mapped.
In case of @IdClass, the primary key class have to implement equals() and hashCode() methods.
For @EmbeddedId which class have to implement those methods, entity or embedded class?
Thanks for help. [ August 11, 2008: Message edited by: Alexandre Fradin ]
posted 8 years ago
The class with @Embeddable annotation i.e. Embeddable class.