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
1280
1280
this
1281
1281
);
1282
1282
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
-
1288
1283
getFromClauseAccess ().registerTableGroup ( rootPath , rootTableGroup );
1289
1284
1290
1285
final InsertSelectStatement insertStatement = new InsertSelectStatement (
@@ -1300,9 +1295,8 @@ public InsertStatement visitInsertValuesStatement(SqmInsertValuesStatement<?> sq
1300
1295
rootTableGroup
1301
1296
);
1302
1297
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" );
1306
1300
}
1307
1301
1308
1302
for ( SqmValues sqmValues : sqmStatement .getValuesList () ) {
You can’t perform that action at this time.
0 commit comments