In Relation To
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Hibernate 6 introduced a cleaner alternative to the legacy JPQL `select new` syntax. Instead of embedding the constructor call in the query string, you can now pass the result type directly to `createQuery()` and Hibernate infers the mapping automatically. This works with Java records and also in Hibernate Data Repositories via the `@Query` annotation. The author notes this improvement is still underused and plans to standardize it in Jakarta Persistence 4, with a version already included in Jakarta Data 1.1.
Sort: