有关可用的日期功能,请参见Hibernate文档。
http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html
在第14.10节中注意这一行
second(...), minute(...), hour(...), day(...), month(...), and year(...)
所以这应该工作
... where year(t.endDate) > year(t.startDate) and month(t.endDate) > month(t.startDate) and day(t.endDate) > day(t.startDate)
报告为满足问题的解决方案是
... where DATE(t.endDate) > (t.startDate)



