Puhong You (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16469 (
https://hibernate.atlassian.net/browse/HHH-16469?atlOrigin=eyJpIjoiOTg5ZT...
)
Re: Hibernate repeatedly issues identical SELECT queries to load an optional one-to-one
association (
https://hibernate.atlassian.net/browse/HHH-16469?atlOrigin=eyJpIjoiOTg5ZT...
)
Hi, Andrea,
I figured out the reason why the 4th query is different between our test cases. I have the
property hibernate.max_fetch_depth set to 1 in the SessionFactory of my environment and
that property is not set in the SessionFactory of your test class. If you add this line to
your settings then you will see the extra queries:
@Setting(name=AvailableSettings.MAX_FETCH_DEPTH, value = "1"),
Now the question is: If there is no row in the AGENCY_DETAIL table for the agency, there
are as many extra SELECT FROM AGENCY_DETAIL queries as the number of rows in the
GROUP_USER table. However, If there is one row in the AGENCY_DETAIL table for the agency,
then there is NO extra SELECT FROM AGENCY_DETAIL query. Do you have any insight why that’s
the case?
(
https://hibernate.atlassian.net/browse/HHH-16469#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16469#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100222- sha1:57eb20e )