Add Hibernate 7 batches 2-6, batch 7, and batch 8: mapping styles, JPA annotations, natural IDs, @Immutable, stored procedures, in-memory test databases, JNDI mocking, proxies, associations, temporal mapping, named queries, HQL, Criteria API, EntityManager bootstrapping, Ehcache 3 L2 cache configuration, HikariCP connection pooling, Hibernate Validator CDI integration, aggregate functions, sorting, pagination, interceptors, and Hibernate Search 8 (Hibernate 7.4.5.Final + Spring Boot 4.1.1 + JDK 25)

This commit is contained in:
2026-09-20 06:06:42 +00:00
committed by Claude
commit 8568c0ce6c
330 changed files with 23668 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# LazyInitializationTest + ProxyIdentityTest -- filtered run output (DEMO log lines only)
# Full raw run: proxy-lazy-and-identity-run.txt
getReference() runtime class: com.ankurm.hibernatedemo.proxy.ProxyPublisher$HibernateProxy
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
verbatim exception class: org.hibernate.LazyInitializationException
verbatim exception message: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '1' (no session)
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
to-one proxy verbatim message: Could not initialize proxy [com.ankurm.hibernatedemo.proxy.ProxyBook#3] - no session
getReference() proxy class: com.ankurm.hibernatedemo.proxy.ProxyBook$HibernateProxy
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
Hibernate.unproxy(proxy) class: com.ankurm.hibernatedemo.proxy.ProxyBook
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 -- LazyInitializationTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 -- ProxyIdentityTest