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:
+12
@@ -0,0 +1,12 @@
|
||||
LazyUser.find(): 2 queries fired BEFORE touching getProfile() at all (expected 2: user + eager profile join/select)
|
||||
after touching getProfile(): 2 queries total (profile=loaded)
|
||||
MiUser.find() (no mappedBy field at all): 1 query
|
||||
explicit MiProfile.find() by shared PK when actually needed: 2 total queries
|
||||
select lu1_0.id,lu1_0.username from lazy_user lu1_0 where lu1_0.id=?
|
||||
Hibernate: select lu1_0.id,lu1_0.username from lazy_user lu1_0 where lu1_0.id=?
|
||||
select lp1_0.id,lp1_0.bio,lp1_0.user_id from lazy_profile lp1_0 where lp1_0.user_id=?
|
||||
Hibernate: select lp1_0.id,lp1_0.bio,lp1_0.user_id from lazy_profile lp1_0 where lp1_0.user_id=?
|
||||
select mu1_0.id,mu1_0.username from mi_user mu1_0 where mu1_0.id=?
|
||||
Hibernate: select mu1_0.id,mu1_0.username from mi_user mu1_0 where mu1_0.id=?
|
||||
select mp1_0.id,mp1_0.bio,u1_0.id,u1_0.username from mi_profile mp1_0 join mi_user u1_0 on u1_0.id=mp1_0.id where mp1_0.id=?
|
||||
Hibernate: select mp1_0.id,mp1_0.bio,u1_0.id,u1_0.username from mi_profile mp1_0 join mi_user u1_0 on u1_0.id=mp1_0.id where mp1_0.id=?
|
||||
Reference in New Issue
Block a user