rsdara6 wrote:
Hi Hibernate Experts,
Example Query:
SELECT * FROM V_NEWS_SUBJECT WHERE ID NOT IN (118,117,114,113,112,111,108,104,103,102,94,93,92,89,88,87)
Hello
You could use Criteria Queries:
http://www.hibernate.org/hib_docs/v3/re ... g-criteria
The idea is to add a restrictions like the below one:
Code:
Criteria criterio = session.createCriteria(XXX.class);
Vector<Integer> foo =new Vector<Integer>();
foo.add(118);
foo.add(117);
[...]
foo.add(87);
criterio.add(
Restrictions.not(
Restrictions.in("V_NEWS_SUBJECT", foo)
)
);