Skip to content

Commit 09fdafb

Browse files
committed
fix
1 parent 28f30d1 commit 09fdafb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/session/impl/ReactiveSessionImpl.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.hibernate.bytecode.enhance.spi.interceptor.EnhancementAsProxyLazinessInterceptor;
2929
import org.hibernate.collection.spi.PersistentCollection;
3030
import org.hibernate.dialect.Dialect;
31-
import org.hibernate.engine.internal.StatefulPersistenceContext;
3231
import org.hibernate.engine.spi.EffectiveEntityGraph;
3332
import org.hibernate.engine.spi.EntityEntry;
3433
import org.hibernate.engine.spi.EntityKey;
@@ -189,7 +188,7 @@ private void threadCheck() {
189188
}
190189

191190
@Override
192-
protected StatefulPersistenceContext createPersistenceContext() {
191+
protected PersistenceContext createPersistenceContext() {
193192
return new ReactivePersistenceContextAdapter( this );
194193
}
195194

@@ -1700,14 +1699,14 @@ public void checkOpen() {
17001699

17011700
@Override
17021701
public void removeOrphanBeforeUpdates(String entityName, Object child) {
1703-
throw new UnsupportedOperationException();
1702+
throw LOG.nonReactiveMethodCall( "reactiveRemoveOrphanBeforeUpdates" );
17041703
}
17051704

17061705
@Override
17071706
public CompletionStage<Void> reactiveRemoveOrphanBeforeUpdates(String entityName, Object child) {
17081707
// TODO: The removeOrphan concept is a temporary "hack" for HHH-6484. This should be removed once action/task
17091708
// ordering is improved.
1710-
final StatefulPersistenceContext persistenceContext = (StatefulPersistenceContext) getPersistenceContextInternal();
1709+
final PersistenceContext persistenceContext = getPersistenceContextInternal();
17111710
persistenceContext.beginRemoveOrphanBeforeUpdates();
17121711
return fireRemove( new DeleteEvent( entityName, child, false, true, this ) )
17131712
.thenAccept( v -> {
@@ -1728,7 +1727,7 @@ private void logRemoveOrphanBeforeUpdates(
17281727
String timing,
17291728
String entityName,
17301729
Object entity,
1731-
StatefulPersistenceContext persistenceContext) {
1730+
PersistenceContext persistenceContext) {
17321731
if ( LOG.isTraceEnabled() ) {
17331732
final EntityEntry entityEntry = persistenceContext.getEntry( entity );
17341733
LOG.tracef(

0 commit comments

Comments
 (0)