28
28
import org .hibernate .bytecode .enhance .spi .interceptor .EnhancementAsProxyLazinessInterceptor ;
29
29
import org .hibernate .collection .spi .PersistentCollection ;
30
30
import org .hibernate .dialect .Dialect ;
31
- import org .hibernate .engine .internal .StatefulPersistenceContext ;
32
31
import org .hibernate .engine .spi .EffectiveEntityGraph ;
33
32
import org .hibernate .engine .spi .EntityEntry ;
34
33
import org .hibernate .engine .spi .EntityKey ;
@@ -189,7 +188,7 @@ private void threadCheck() {
189
188
}
190
189
191
190
@ Override
192
- protected StatefulPersistenceContext createPersistenceContext () {
191
+ protected PersistenceContext createPersistenceContext () {
193
192
return new ReactivePersistenceContextAdapter ( this );
194
193
}
195
194
@@ -1700,14 +1699,14 @@ public void checkOpen() {
1700
1699
1701
1700
@ Override
1702
1701
public void removeOrphanBeforeUpdates (String entityName , Object child ) {
1703
- throw new UnsupportedOperationException ( );
1702
+ throw LOG . nonReactiveMethodCall ( "reactiveRemoveOrphanBeforeUpdates" );
1704
1703
}
1705
1704
1706
1705
@ Override
1707
1706
public CompletionStage <Void > reactiveRemoveOrphanBeforeUpdates (String entityName , Object child ) {
1708
1707
// TODO: The removeOrphan concept is a temporary "hack" for HHH-6484. This should be removed once action/task
1709
1708
// ordering is improved.
1710
- final StatefulPersistenceContext persistenceContext = ( StatefulPersistenceContext ) getPersistenceContextInternal ();
1709
+ final PersistenceContext persistenceContext = getPersistenceContextInternal ();
1711
1710
persistenceContext .beginRemoveOrphanBeforeUpdates ();
1712
1711
return fireRemove ( new DeleteEvent ( entityName , child , false , true , this ) )
1713
1712
.thenAccept ( v -> {
@@ -1728,7 +1727,7 @@ private void logRemoveOrphanBeforeUpdates(
1728
1727
String timing ,
1729
1728
String entityName ,
1730
1729
Object entity ,
1731
- StatefulPersistenceContext persistenceContext ) {
1730
+ PersistenceContext persistenceContext ) {
1732
1731
if ( LOG .isTraceEnabled () ) {
1733
1732
final EntityEntry entityEntry = persistenceContext .getEntry ( entity );
1734
1733
LOG .tracef (
0 commit comments