From fc1d0f54565db9d1e091923b50694e963d5e62e3 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Mon, 4 Nov 2024 20:49:16 +0100 Subject: [PATCH] minor changes Signed-off-by: Gavin King --- .../org/hibernate/id/insert/InsertReturningDelegate.java | 8 ++++---- .../id/insert/SybaseJConnGetGeneratedKeysDelegate.java | 8 ++++---- .../src/main/java/org/hibernate/mapping/BasicValue.java | 1 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/id/insert/InsertReturningDelegate.java b/hibernate-core/src/main/java/org/hibernate/id/insert/InsertReturningDelegate.java index 93f7bbe170..17892d35bd 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/insert/InsertReturningDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/id/insert/InsertReturningDelegate.java @@ -96,10 +96,10 @@ public class InsertReturningDelegate extends AbstractReturningDelegate { @Override public String prepareIdentifierGeneratingInsert(String insertSQL) { - return dialect().getIdentityColumnSupport().appendIdentitySelectToInsert( - ( (BasicEntityIdentifierMapping) persister.getRootEntityDescriptor().getIdentifierMapping() ).getSelectionExpression(), - insertSQL - ); + final BasicEntityIdentifierMapping identifierMapping = + (BasicEntityIdentifierMapping) persister.getRootEntityDescriptor().getIdentifierMapping(); + return dialect().getIdentityColumnSupport() + .appendIdentitySelectToInsert( identifierMapping.getSelectionExpression(), insertSQL ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/id/insert/SybaseJConnGetGeneratedKeysDelegate.java b/hibernate-core/src/main/java/org/hibernate/id/insert/SybaseJConnGetGeneratedKeysDelegate.java index 6a72a20561..6f1b93cc67 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/insert/SybaseJConnGetGeneratedKeysDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/id/insert/SybaseJConnGetGeneratedKeysDelegate.java @@ -33,10 +33,10 @@ public class SybaseJConnGetGeneratedKeysDelegate extends GetGeneratedKeysDelegat @Override public String prepareIdentifierGeneratingInsert(String insertSQL) { - return dialect().getIdentityColumnSupport().appendIdentitySelectToInsert( - ( (BasicEntityIdentifierMapping) persister.getRootEntityDescriptor().getIdentifierMapping() ).getSelectionExpression(), - insertSQL - ); + final BasicEntityIdentifierMapping identifierMapping = + (BasicEntityIdentifierMapping) persister.getRootEntityDescriptor().getIdentifierMapping(); + return dialect().getIdentityColumnSupport() + .appendIdentitySelectToInsert( identifierMapping.getSelectionExpression(), insertSQL ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java index 9c007ed6ed..d4ba9064cb 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java @@ -34,7 +34,6 @@ import org.hibernate.boot.model.process.internal.VersionResolution; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; -import org.hibernate.boot.spi.InFlightMetadataCollector; import org.hibernate.boot.spi.MetadataBuildingContext; import org.hibernate.dialect.Dialect; import org.hibernate.engine.jdbc.Size;