Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private CompletionStage<Void> fetchAndDelete(DeleteEvent event, DeleteContext tr
: !source.contains( objectEvent );
if ( detached ) {
// Hibernate Reactive doesn't support detached instances in remove()
throw new IllegalArgumentException( "unmanaged instance passed to remove()" );
throw new IllegalArgumentException( "Unmanaged instance passed to remove()" );
}

//Object entity = persistenceContext.unproxyAndReassociate( event.getObject() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public CompletionStage<Void> reactiveOnLock(LockEvent event) throws HibernateExc
: !source.contains( event.getObject() );
if ( detached ) {
// Hibernate Reactive doesn't support detached instances in refresh()
throw new IllegalArgumentException( "unmanaged instance passed to refresh()" );
throw new IllegalArgumentException( "Unmanaged instance passed to refresh()" );
}


Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.boot.spi.SessionFactoryOptions;
import org.hibernate.internal.SessionFactoryImpl;
import org.hibernate.query.spi.QueryEngine;
import org.hibernate.reactive.boot.spi.ReactiveMetadataImplementor;
import org.hibernate.reactive.mutiny.Mutiny;
import org.hibernate.reactive.mutiny.impl.MutinySessionFactoryImpl;
Expand All @@ -29,11 +28,6 @@ public ReactiveSessionFactoryImpl(MetadataImplementor bootMetamodel, SessionFact
super( new ReactiveMetadataImplementor( bootMetamodel ), options, bootstrapContext );
}

@Override
public QueryEngine getQueryEngine() {
return super.getQueryEngine();
}

@Override
public <T> T unwrap(Class<T> type) {
if ( type.isAssignableFrom( Stage.SessionFactory.class ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.hibernate.engine.spi.EffectiveEntityGraph;
import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.spi.EntityKey;
import org.hibernate.engine.spi.ExceptionConverter;
import org.hibernate.engine.spi.PersistenceContext;
import org.hibernate.engine.spi.PersistentAttributeInterceptable;
import org.hibernate.engine.spi.PersistentAttributeInterceptor;
Expand Down Expand Up @@ -167,9 +166,6 @@ public class ReactiveSessionImpl extends SessionImpl implements ReactiveSession,
private ReactiveConnection reactiveConnection;
private final Thread associatedWorkThread;

//Lazily initialized
private transient ExceptionConverter exceptionConverter;

public ReactiveSessionImpl(SessionFactoryImpl delegate, SessionCreationOptions options, ReactiveConnection connection) {
super( delegate, options );
InternalStateAssertions.assertUseOnEventLoop();
Expand Down Expand Up @@ -1128,14 +1124,6 @@ private CompletionStage<Void> doFlush() {
} );
}

@Override
public ExceptionConverter getExceptionConverter() {
if ( exceptionConverter == null ) {
exceptionConverter = new ReactiveExceptionConverter( this );
}
return exceptionConverter;
}

@Override
public CompletionStage<Void> reactiveRefresh(Object entity, LockOptions lockOptions) {
checkOpen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ context, populateDB()
session.remove( new GuineaPig( 5, "Aloi" ) )
) )
.invoke( e -> assertThat( e )
.hasMessageContaining( "unmanaged instance passed to remove" )
.hasMessageContaining( "Unmanaged instance passed to remove" )
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;

import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.reactive.common.AffectedEntities;
import org.hibernate.reactive.mutiny.Mutiny;
Expand Down Expand Up @@ -725,11 +724,11 @@ public void reactiveRemoveTransientEntity(VertxTestContext context) {
.thenCompose( v -> selectNameFromId( 5 ) )
.thenAccept( result -> assertThat( result ).isNotNull() )
.thenCompose( v -> openSession() )
.thenCompose( session -> assertThrown( HibernateException.class, session.remove( new GuineaPig( 5, "Aloi" ) ) )
.thenCompose( session -> assertThrown( IllegalArgumentException.class, session.remove( new GuineaPig( 5, "Aloi" ) ) )
)
.thenAccept( t -> assertThat( t )
.hasCauseInstanceOf( IllegalArgumentException.class )
.hasMessageContaining( "unmanaged instance" )
.isInstanceOf( IllegalArgumentException.class )
.hasMessageContaining( "Unmanaged instance" )
)
);
}
Expand Down
Loading