java.lang.IllegalArgumentException: expecting IdClass mapping
I have configured composite primary key for my entity Employee as follows Employee.java: @Entity @Table(name="employee") @Proxy(lazy=false) @IdClass(EmployeeId.class) public class Employee implements Serializable { private static final long serialVersionUID = 1L; private EmployeeId employeeId; private Person person; private Branch branch; private boolean isActive; public Employee() { } @EmbeddedId @AttributeOverrides({ @AttributeOverride(name="person", column = @Column(name="person_id")), @AttributeOverride(name="branch", column = @Column(name="branch_id"))}) public EmployeeId getEmployeeId()