I am having trouble converting my SQL code into appropriate HQL code. Specifically the following SQL
Code:
SELECT * FROM myTable WHERE (col1, col2) IN ((1,1),(1,2),(1,3))
I have managed to get a single column IN clause to work properly by passing a List to a named parameter, but I cannot figure out how to format the HQL to accomplish this for multiple columns. Every time I try and pass in an array of arrays it doesn't put in the parens. I would like to avoid having to write the whole string out like the following:
Code:
from myTable myt where (myt.col1, myt.col2) in ((?,?),(?,?),(?,?))
If it makes any difference I am using the latest version of Hibernate with Spring and class files generated from the Hibernate Synchronizer Eclipse plugin. The DAOs are also backed by the HibernateTemplate from Spring.
Thanks in advance.