File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
hibernate-core/src/main/java/org/hibernate Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -539,21 +539,11 @@ protected boolean supportsRowValueConstructorSyntax() {
539
539
return false ;
540
540
}
541
541
542
- @ Override
543
- protected boolean supportsRowValueConstructorSyntaxInInList () {
544
- return true ;
545
- }
546
-
547
542
@ Override
548
543
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates () {
549
544
return false ;
550
545
}
551
546
552
- @ Override
553
- protected boolean supportsRowValueConstructorSyntaxInInSubQuery () {
554
- return true ;
555
- }
556
-
557
547
@ Override
558
548
protected String getFromDual () {
559
549
return " from dual" ;
Original file line number Diff line number Diff line change @@ -7714,14 +7714,14 @@ else if ( subquery != null && !supportsRowValueConstructorSyntaxInQuantifiedPred
7714
7714
else if ( needsTupleComparisonEmulation ( operator ) ) {
7715
7715
rhsTuple = SqlTupleContainer .getSqlTuple ( rhsExpression );
7716
7716
assert rhsTuple != null ;
7717
- // Some DBs like Oracle support tuples only for the IN subquery predicate
7718
- if ( ( operator == ComparisonOperator .EQUAL || operator == ComparisonOperator .NOT_EQUAL ) && supportsRowValueConstructorSyntaxInInSubQuery () ) {
7717
+ // If the DB supports tuples in the IN list predicate, use that syntax as it's more concise
7718
+ if ( ( operator == ComparisonOperator .EQUAL || operator == ComparisonOperator .NOT_EQUAL ) && supportsRowValueConstructorSyntaxInInList () ) {
7719
7719
comparisonPredicate .getLeftHandExpression ().accept ( this );
7720
7720
if ( operator == ComparisonOperator .NOT_EQUAL ) {
7721
7721
appendSql ( " not" );
7722
7722
}
7723
7723
appendSql ( " in (" );
7724
- renderExpressionsAsSubquery ( rhsTuple .getExpressions () );
7724
+ rhsTuple .accept ( this );
7725
7725
appendSql ( CLOSE_PARENTHESIS );
7726
7726
}
7727
7727
else {
You can’t perform that action at this time.
0 commit comments