Hibernate criteria DB2 composite keys in IN clause

Posted by nkr1pt on Stack Overflow See other posts from Stack Overflow or by nkr1pt
Published on 2010-04-26T15:08:54Z Indexed on 2010/04/26 15:13 UTC
Read the original article Hit count: 375

Filed under:
|
|
|

Hibernate criteria, using DB2 dialect, generates the following sql with composite keys in the IN clause, but DB2 answers that the query is incorrect:

select * from tableA where (x, y) IN ( ( 'x1', y1) )

but, DB2 throws this:

SQL0104N An unexpected token "," was found following ", y) in ( ('x1'". Expected tokens may include: "+". SQLSTATE=42601

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about java