Skip to content

Align the session to the latest changes in ORM 7 #2206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2025
Merged
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 @@ -12,6 +12,7 @@
import jakarta.persistence.PersistenceException;

import org.hibernate.HibernateException;
import org.hibernate.JDBCException;
import org.hibernate.LazyInitializationException;
import org.hibernate.cache.CacheException;
import org.hibernate.dialect.Dialect;
Expand All @@ -24,6 +25,7 @@
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;

import static org.jboss.logging.Logger.Level.DEBUG;
import static org.jboss.logging.Logger.Level.ERROR;
import static org.jboss.logging.Logger.Level.INFO;
import static org.jboss.logging.Logger.Level.WARN;
Expand Down Expand Up @@ -315,4 +317,12 @@ public interface Log extends BasicLogger {
@LogMessage(level = WARN)
@Message( id= 494, value = "Attempt to merge an uninitialized collection with queued operations; queued operations will be ignored: %s")
void ignoreQueuedOperationsOnMerge(String collectionInfoString);

// Same method in ORM
@LogMessage(level = DEBUG)
@Message(value = "JDBCException was thrown for a transaction marked for rollback. " +
" This is probably due to an operation failing fast due to the transaction being marked for rollback.",
id = 520)
void jdbcExceptionThrownWithTransactionRolledBack(@Cause JDBCException e);

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.event.spi.DeleteContext;
import org.hibernate.event.spi.LoadEventListener;
import org.hibernate.event.spi.MergeContext;
import org.hibernate.event.spi.PersistContext;
import org.hibernate.event.spi.RefreshContext;
Expand Down Expand Up @@ -66,6 +67,8 @@ public interface ReactiveSession extends ReactiveQueryProducer, ReactiveSharedSe

CompletionStage<Void> reactiveMerge(Object object, MergeContext copiedAlready);

CompletionStage<Object> reactiveLoad(LoadEventListener.LoadType loadType, Object id, String entityName, LockOptions lockOptions, Boolean readOnly);

CompletionStage<Void> reactiveFlush();

CompletionStage<Void> reactiveAutoflush();
Expand Down
Loading
Loading