Fix RefreshTest

This commit is contained in:
Andrea Boriero 2016-05-01 19:22:29 +01:00 committed by Steve Ebersole
parent d6a3fdb771
commit 3637bd342d
1 changed files with 5 additions and 0 deletions

View File

@ -1238,6 +1238,11 @@ public final class SessionImpl
private void fireRefresh(RefreshEvent event) {
try {
if ( getSessionFactory().getSessionFactoryOptions().isJpaBootstrap() ) {
if ( !contains( event.getObject() ) ) {
throw new IllegalArgumentException( "Entity not managed" );
}
}
checkOpen();
checkTransactionSynchStatus();
for ( RefreshEventListener listener : listeners( EventType.REFRESH ) ) {