From fe5fa5dce4e48b627ec43c0d0c3b1266203d0093 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 15 Dec 2022 20:53:58 +0100 Subject: [PATCH] HHH-15550 New global and persistent temporary `create_tables` params --- .../internal/temptable/GlobalTemporaryTableStrategy.java | 9 ++++++--- .../internal/temptable/PersistentTableStrategy.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/GlobalTemporaryTableStrategy.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/GlobalTemporaryTableStrategy.java index eab9812a51..5d51c8120e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/GlobalTemporaryTableStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/GlobalTemporaryTableStrategy.java @@ -59,6 +59,8 @@ public class GlobalTemporaryTableStrategy { return; } + prepared = true; + final ConfigurationService configService = mappingModelCreationProcess.getCreationContext() .getBootstrapContext() .getServiceRegistry().getService( ConfigurationService.class ); @@ -72,8 +74,6 @@ public class GlobalTemporaryTableStrategy { return; } - prepared = true; - log.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() ); final TemporaryTableHelper.TemporaryTableCreationWork temporaryTableCreationWork = new TemporaryTableHelper.TemporaryTableCreationWork( @@ -132,7 +132,10 @@ public class GlobalTemporaryTableStrategy { } catch (UnsupportedOperationException e) { // assume this comes from org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl - log.debugf( "Unable to obtain JDBC connection; unable to drop global-temp ID table : %s", getTemporaryTable().getTableExpression() ); + log.debugf( + "Unable to obtain JDBC connection; unable to drop global-temp ID table : %s", + getTemporaryTable().getTableExpression() + ); return; } catch (SQLException e) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/PersistentTableStrategy.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/PersistentTableStrategy.java index 80ff4b858c..ac8aad8ca8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/PersistentTableStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/PersistentTableStrategy.java @@ -65,6 +65,8 @@ public abstract class PersistentTableStrategy { return; } + prepared = true; + final ConfigurationService configService = mappingModelCreationProcess.getCreationContext() .getBootstrapContext() .getServiceRegistry().getService( ConfigurationService.class ); @@ -78,8 +80,6 @@ public abstract class PersistentTableStrategy { return; } - prepared = true; - log.debugf( "Creating persistent ID table : %s", getTemporaryTable().getTableExpression() ); final TemporaryTableHelper.TemporaryTableCreationWork temporaryTableCreationWork = new TemporaryTableHelper.TemporaryTableCreationWork(