fix insert ... values (...) statements

they break when using a MultiTableInsertQueryPlan, but we probably don't need one
This commit is contained in:
Gavin King 2022-01-01 21:39:47 +01:00
parent cb787e87a8
commit a61ffbfea7
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ public class QuerySqmImpl<R>
final EntityPersister entityDescriptor = getSessionFactory().getDomainModel().findEntityDescriptor( entityNameToInsert ); final EntityPersister entityDescriptor = getSessionFactory().getDomainModel().findEntityDescriptor( entityNameToInsert );
final SqmMultiTableInsertStrategy multiTableStrategy = entityDescriptor.getSqmMultiTableInsertStrategy(); final SqmMultiTableInsertStrategy multiTableStrategy = entityDescriptor.getSqmMultiTableInsertStrategy();
if ( multiTableStrategy == null ) { if ( multiTableStrategy == null || sqmInsert instanceof SqmInsertValuesStatement ) {
return new SimpleInsertQueryPlan( sqmInsert, domainParameterXref ); return new SimpleInsertQueryPlan( sqmInsert, domainParameterXref );
} }
else { else {