HHH-7454 added DEBUG log message 'PersistenceUnitUtil#isLoaded is not always accurate; consider using EntityManager#contains instead'
This commit is contained in:
parent
ccc58c50ae
commit
b76e7c4987
|
@ -293,6 +293,8 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
|
|||
}
|
||||
|
||||
public boolean isLoaded(Object entity, String attributeName) {
|
||||
// added log message to help with HHH-7454, if state == LoadState,NOT_LOADED, returning true or false is not accurate.
|
||||
log.debug("PersistenceUnitUtil#isLoaded is not always accurate; consider using EntityManager#contains instead");
|
||||
LoadState state = PersistenceUtilHelper.isLoadedWithoutReference( entity, attributeName, cache );
|
||||
if (state == LoadState.LOADED) {
|
||||
return true;
|
||||
|
@ -306,6 +308,8 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
|
|||
}
|
||||
|
||||
public boolean isLoaded(Object entity) {
|
||||
// added log message to help with HHH-7454, if state == LoadState,NOT_LOADED, returning true or false is not accurate.
|
||||
log.debug("PersistenceUnitUtil#isLoaded is not always accurate; consider using EntityManager#contains instead");
|
||||
return PersistenceUtilHelper.isLoaded( entity ) != LoadState.NOT_LOADED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue