mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 00:55:16 +00:00
HHH-18647 Fix insert values check for table group joins
This commit is contained in:
parent
91b18622d5
commit
8a0dab9071
@ -1280,11 +1280,6 @@ public InsertStatement visitInsertValuesStatement(SqmInsertValuesStatement<?> sq
|
||||
this
|
||||
);
|
||||
|
||||
if ( !rootTableGroup.getTableReferenceJoins().isEmpty()
|
||||
|| !rootTableGroup.getTableGroupJoins().isEmpty() ) {
|
||||
throw new HibernateException( "Not expecting multiple table references for an SQM INSERT-SELECT" );
|
||||
}
|
||||
|
||||
getFromClauseAccess().registerTableGroup( rootPath, rootTableGroup );
|
||||
|
||||
final InsertSelectStatement insertStatement = new InsertSelectStatement(
|
||||
@ -1300,9 +1295,8 @@ public InsertStatement visitInsertValuesStatement(SqmInsertValuesStatement<?> sq
|
||||
rootTableGroup
|
||||
);
|
||||
|
||||
if ( !rootTableGroup.getTableReferenceJoins().isEmpty()
|
||||
|| !rootTableGroup.getTableGroupJoins().isEmpty() ) {
|
||||
throw new SemanticException( "Not expecting multiple table references for an SQM INSERT-SELECT" );
|
||||
if ( hasJoins( rootTableGroup ) ) {
|
||||
throw new HibernateException( "Not expecting multiple table references for an SQM INSERT-SELECT" );
|
||||
}
|
||||
|
||||
for ( SqmValues sqmValues : sqmStatement.getValuesList() ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user