Is there a way for me to do a following type search using hibernate Criteria/Restriction ---
Table "School" has a column "dept_id". I have a big array of "dept_id", is there a way for me to get all the rows whose "dept_id" are contained in my array of "dept_id". If we use SQL, we have to use syntax "WHERE dept_id IN (id1, id2,......).." which is tedious to create and is not elegant. Is there a faster and cleaner way for us to do it in Hibernate ?
Thanks Mark. Couple of more questions if you don't mind ---
1. do you think Criteria and Restriction can't do the same thing ? I guess they can't, but if you can verify this with me, will save me time researching on that.
2. HQL is cool. But so far I have only seen examples like "from MyTable where ..". It means select everything from the table. How can I do things like SQL "select T1.name, T2.address from T1, T2 where T1.id = T2.id and ..." ?? i.e. select a subset from tables
Can HQL do the same thing ?
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads