【问题标题】:Nhibernate Hql query retrieve DateTime emptyNhibernate Hql 查询检索 DateTime 为空
【发布时间】:2010-06-30 16:50:26
【问题描述】:

我需要 hql 查询来检索日期时间属性中具有空值的对象

类似的东西

来自用户 u,其中 u.LastLogon 为空

LastLogon 是一个日期时间? MS Sql 表中的属性、日期时间

你怎么能这样做?

【问题讨论】:

  • 对于日期时间?为空,但对于 DateTime 属性应该是 MS SQL 中支持的最小值,但我不知道除了 MS SQL 以外的其他数据库应该如何

标签: nhibernate datetime hql


【解决方案1】:

from Users u where u.LastLogon is null 应该可以工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-11-09
    • 2011-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多