Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: MySQL
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
The hibernate documentation at 15.11. Subqueries, refers to tuple constructor to perform the following query
from Cat as cat
where not ( cat.name, cat.color ) in (
select cat.name, cat.color from DomesticCat cat
)
My question is how do I perform this type of query binding a parameter list to the IN clause?
My best guess would be :
from Cat as cat
where not ( cat.name, cat.color ) in ( (:name, :color ) )
and
setParameterList("name", namesList);
setParameterList("color ", colorList );
remebering that we want the final SQL too look like this
.... in ( ('tim', 'white'),('peter','blue') )
Would very much appreciate a hint in the right direction as I really don't want to have to write some dynamic native SQL.
Thanks in advance.
Craig.