File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
hibernate-core/src/main/java/org/hibernate/sql/ast/spi Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -7753,7 +7753,24 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
7753
7753
}
7754
7754
else if ( !supportsRowValueConstructorSyntaxInInList () ) {
7755
7755
// Some DBs like Oracle support tuples only for the IN subquery predicate
7756
- if ( supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7756
+ if ( supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsValuesList () ) {
7757
+ inListPredicate .getTestExpression ().accept ( this );
7758
+ if ( inListPredicate .isNegated () ) {
7759
+ appendSql ( " not" );
7760
+ }
7761
+ appendSql ( " in (select * from (values" );
7762
+ char separator = ' ' ;
7763
+ for ( Expression expression : listExpressions ) {
7764
+ appendSql ( separator );
7765
+ appendSql ( OPEN_PARENTHESIS );
7766
+ renderCommaSeparated ( SqlTupleContainer .getSqlTuple ( expression ).getExpressions () );
7767
+ appendSql ( CLOSE_PARENTHESIS );
7768
+ separator = ',' ;
7769
+ }
7770
+ appendSql ( CLOSE_PARENTHESIS );
7771
+ appendSql ( CLOSE_PARENTHESIS );
7772
+ }
7773
+ else if ( supportsRowValueConstructorSyntaxInInSubQuery () && dialect .supportsUnionAll () ) {
7757
7774
inListPredicate .getTestExpression ().accept ( this );
7758
7775
if ( inListPredicate .isNegated () ) {
7759
7776
appendSql ( " not" );
You can’t perform that action at this time.
0 commit comments