JPA metamodel generator is not considering Java 14's records

Description

Though hibernate 6.2 is supporting mapping of Java records as embeddable types, it’s metamodel generator is not generating anything at all for these records, causing devs relying mostly on the criteria API for complex query building not being able to use records for that purpose.

Attachments

3

Activity

Show:

Čedomir Igaly April 2, 2023 at 11:10 AM
Edited

… but the solution can not work since Hibernate is built using JDK 11

Čedomir Igaly April 2, 2023 at 11:04 AM
Edited

Fixed code by including JDK 14 records during preprocessing.

 

Created

Čedomir Igaly April 1, 2023 at 11:58 AM
Edited

Atached are test case, entity class and embeddable record.

 

Test is failing with message “org.hibernate.jpamodelgen.test.records.Address_ was not generated.”

 

 

Or on GitHub

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 7, 2023 at 12:59 PM
Updated April 28, 2023 at 9:36 AM
Resolved April 25, 2023 at 8:23 AM