| am using the version 5.2.17.Final of Hibernate. I have an entity Employee that extends the entity Person (please find as attached files my entities Employee.java PersonId.java Person.java ). When I try to update an instance of employee , the exception "Duplicate entry 'Test' for key 'PRIMARY' " is thrown. When I remove the annotation @IdClass(value = PersonId.class) from the Entity Person, the update works fine. When i debugged in hibernate, the entity Employee is always considered as transient when merging the object. Can you please tell me why when I add @IdClass i cannot update a sub entity and the system will always try to invoke the insert ? |