Add h8-preview module: hibernate-demo suite against Hibernate 8.0.0.Beta3 and Jakarta Persistence 4.0.0-M7

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
This commit is contained in:
Claude
2026-09-28 08:42:17 +00:00
parent 8568c0ce6c
commit 833f3e1c31
35 changed files with 769 additions and 0 deletions
@@ -0,0 +1,16 @@
import org.hibernate.Session;
import org.hibernate.query.NativeQuery;
import org.hibernate.transform.Transformers;
/** Not built. Result transformers were the classic way to map a native query onto a DTO. */
class UsesTransformers {
public static class Dto {
public Integer id;
}
Object rows(Session s) {
return s.createNativeQuery("select 1 as id", Object.class).unwrap(NativeQuery.class)
.setResultTransformer(Transformers.aliasToBean(Dto.class)).list();
}
}