最近写了个hql语句选择表中某字段不为空的记录,结果查询不到结果。
from ApplyTable a where a.remark!= null
后来发现不为空不能这么表达,要是这样的 is not null 。然后修改hql语句,OK。
from ApplyTable a where a.remark is not null
最近写了个hql语句选择表中某字段不为空的记录,结果查询不到结果。
from ApplyTable a where a.remark!= null
后来发现不为空不能这么表达,要是这样的 is not null 。然后修改hql语句,OK。
from ApplyTable a where a.remark is not null