NPE in MappingMetamodelImpl if inheritance is used in IdClass

Description

In Hibernate-Core 6.1.7 we could use inheritance in IdClasses like so:

But since 6.2.x this will raise a cryptic NPE:

 

Expected Behavior

Instead of an NPE, I would expect a more helpfull message, i.e.:

Illegal embeddable valued model definition: com.example.PK.class.

Attachments

1

Activity

Show:

Marco Belladelli May 29, 2023 at 1:08 PM

I think adding @MappedSuperclass to the ParentPrimaryKey class should fix your test case. We might consider a more informative error in this case, though I’m not sure how we would check this.

Fixed

Details

Assignee

Reporter

Worked in

Components

Sprint

Fix versions

Affects versions

Priority

Created May 22, 2023 at 12:02 PM
Updated June 7, 2023 at 9:11 AM
Resolved May 31, 2023 at 7:56 AM