diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java index 6e766121fa..6acefeb068 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -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; }