Hello, I am running a hibernate criteria query and setting the query cache using QueryHints. After the first execution, I see the error as below.
Please advise what this error is indicating. During first time execution, I dont see any N+1 queries as below, however, all subsequent requests are triggering these queries.
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - key: EMPLOYEE
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - Element for key EMPLOYEE is null
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - key: DEPARTMENT
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - Element for key DEPARTMENT is null
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - key: ADDRESS
14:44:27,003 - DEBUG - org.hibernate.cache.ehcache.internal.regions.EhcacheGeneralDataRegion - Element for key ADDRESS is null
14:44:27,003 - DEBUG - org.hibernate.cache.internal.StandardQueryCache - Returning cached query results
Hibernate:
/* load com.test.Employee */ select
emp0_.ID as EMP17_0_
from
EMPLOYEE emp0_
where
emp0_.NAME=?
Hibernate:
/* load com.test.Department */ select
dept0_.deptid as dept1_12_3_
from
DEPARTMENT dept0_
where
dept0_.ID=?
Hibernate:
/* load com.test.Employee */ select
emp0_.ID as EMP17_0_
from
EMPLOYEE emp0_
where
emp0_.NAME=?
Hibernate:
/* load com.test.Department */ select
dept0_.deptid as dept1_12_3_
from
DEPARTMENT dept0_
where
dept0_.ID=?