日期:2014-05-20  浏览次数:20595 次

使用hql语句的疑惑
我的hql语句是这样写的,String hql="from Client c where c.clientStatus.csId in (4,5,6) and c.client.usersByUassgin.uid!=null";但是很显然这是一个错误的示例,可是我就是想要得到csis在4,5,6并且uid不为空的值 ,我想问一下各位大侠有没有能行得通的方法!

------解决方案--------------------
SQL code


String hql="from Client c where c.clientStatus.csId in (4,5,6) and c.client.usersByUassgin.uid is not null";

------解决方案--------------------
!=null
换成is not null
------解决方案--------------------
String hql="from Client c where c.clientStatus.csId in (4,5,6) and c.client.usersByUassgin.uid is not null";