From a61ffbfea7b21e05603d01c462e30cec24beabf4 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 1 Jan 2022 21:39:47 +0100 Subject: [PATCH] fix insert ... values (...) statements they break when using a MultiTableInsertQueryPlan, but we probably don't need one --- .../java/org/hibernate/query/sqm/internal/QuerySqmImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java index 58b12af3c1..7a2a432851 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java @@ -933,7 +933,7 @@ public class QuerySqmImpl final EntityPersister entityDescriptor = getSessionFactory().getDomainModel().findEntityDescriptor( entityNameToInsert ); final SqmMultiTableInsertStrategy multiTableStrategy = entityDescriptor.getSqmMultiTableInsertStrategy(); - if ( multiTableStrategy == null ) { + if ( multiTableStrategy == null || sqmInsert instanceof SqmInsertValuesStatement ) { return new SimpleInsertQueryPlan( sqmInsert, domainParameterXref ); } else {