Cannot update a Sub Entiy with the strategy InheritanceType.JOINED and when the addnotation @IdClass is specified in the super entity

Description

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

). 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 ?

Environment

None

Status

Assignee

Unassigned

Reporter

Khaled Ben Ahmed

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.17

Components

Priority

Critical
Configure