File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
hibernate-core/src/main/java/org/hibernate/query/sqm/sql Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1280,11 +1280,6 @@ public InsertStatement visitInsertValuesStatement(SqmInsertValuesStatement<?> sq
12801280 this
12811281 );
12821282
1283- if ( !rootTableGroup .getTableReferenceJoins ().isEmpty ()
1284- || !rootTableGroup .getTableGroupJoins ().isEmpty () ) {
1285- throw new HibernateException ( "Not expecting multiple table references for an SQM INSERT-SELECT" );
1286- }
1287-
12881283 getFromClauseAccess ().registerTableGroup ( rootPath , rootTableGroup );
12891284
12901285 final InsertSelectStatement insertStatement = new InsertSelectStatement (
@@ -1300,9 +1295,8 @@ public InsertStatement visitInsertValuesStatement(SqmInsertValuesStatement<?> sq
13001295 rootTableGroup
13011296 );
13021297
1303- if ( !rootTableGroup .getTableReferenceJoins ().isEmpty ()
1304- || !rootTableGroup .getTableGroupJoins ().isEmpty () ) {
1305- throw new SemanticException ( "Not expecting multiple table references for an SQM INSERT-SELECT" );
1298+ if ( hasJoins ( rootTableGroup ) ) {
1299+ throw new HibernateException ( "Not expecting multiple table references for an SQM INSERT-SELECT" );
13061300 }
13071301
13081302 for ( SqmValues sqmValues : sqmStatement .getValuesList () ) {
You can’t perform that action at this time.
0 commit comments