Fix unwarp for SharedSessionContractImplementor

This commit is contained in:
Andrea Boriero 2016-04-28 17:54:01 +01:00 committed by Steve Ebersole
parent b352756377
commit f4d8a9d850
1 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,7 @@ import org.hibernate.engine.spi.QueryParameters;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.spi.SessionOwner;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.engine.spi.Status;
import org.hibernate.engine.transaction.spi.TransactionImplementor;
import org.hibernate.engine.transaction.spi.TransactionObserver;
@ -3891,6 +3892,9 @@ public final class SessionImpl
if ( SessionImplementor.class.isAssignableFrom( clazz ) ) {
return (T) this;
}
if ( SharedSessionContractImplementor.class.isAssignableFrom( clazz ) ) {
return (T) this;
}
if ( EntityManager.class.isAssignableFrom( clazz ) ) {
return (T) this;
}