Key-to-one to id-class entity with key-to-one doesn't work anymore

Description

The following commit (https://github.com/hibernate/hibernate-orm/commit/7906a27b6ae1218ceadd8d55deb2c911d14a80f9#comments) broke support for key-to-one associations to id-class entities that in turn have a key-to-one again like here:

@Entity(name = "BasicEntity") public static class BasicEntity { @Id Long key1; } @Entity(name = "IdClassEntity") @IdClass(IdClassEntity.IdClassEntityId.class) public static class IdClassEntity { @Id @ManyToOne BasicEntity basicEntity; @Id Long key2; public static class IdClassEntityId implements Serializable { Long basicEntity; Long key2; } } @Entity(name = "NestedIdClassEntity") @IdClass(NestedIdClassEntity.NestedIdClassEntityId.class) public static class NestedIdClassEntity { @Id @ManyToOne IdClassEntity idClassEntity; @Id Long key3; public static class NestedIdClassEntityId implements Serializable { IdClassEntity.IdClassEntityId idClassEntity; Long key3; } }

Activity

Show:
Fixed

Details

Assignee

Reporter

Worked in

Components

Fix versions

Affects versions

Priority

Created November 8, 2021 at 11:54 AM
Updated December 8, 2021 at 1:00 PM
Resolved November 8, 2021 at 3:52 PM