13 lines
1.0 KiB
Plaintext
Executable File
13 lines
1.0 KiB
Plaintext
Executable File
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=?
|