Nested SQL parenthesis issue with Sybase when using IN predicate with JPA Criteria subquery

Description

A JPA Criteria query that use a subquery as value to an IN predicate will run into an error on Sybase if the subquery returns more than one row, because in SQL, we will render it as where id in ((select ...)) i.e. with double parenthesis.

With HQL, this is not a problem, because there we construct the SqmInSubQueryPredicate. If we have to treat IN predicates with a single subquery value specially for this case anyway, we should discuss if SqmInSubQueryPredicate can be removed.

Activity

Details

Assignee

Reporter

Priority

Created May 1, 2024 at 12:14 AM
Updated December 10, 2024 at 9:08 AM