0

我有以下查询是..

SELECT * FROM POS_took WHERE DELETEDDATE IS NOTNULL 

我有相应的pojo....

class postook
{

//all the properties defined here 

private DateTime deleted;

//and it corresponding setters and egetters is defined.

请告知相应的 hql ,我尝试过的如下所示,但它也不是 rite one ..

session.createQuery("from postook where deleted is notnull")
4

2 回答 2

0

也许from postook pok where pok.deleted is not null。但是你得到的错误应该让它更清楚。

于 2013-09-05T17:26:24.460 回答
0

尝试这个:

session.createQuery("from postook where deleted is not null") (add space between NOT and NULL)

您的 SQL 查询的同上:

SELECT * FROM POS_took WHERE DELETEDDATE IS NOT NULL 
于 2013-09-05T22:14:24.077 回答