1
我想下面的HQL翻譯成標準的符號:如何在休眠條件中使用CURRENT_DATE函數?
from Deal
where CURRENT_DATE between startDate and endDate
我嘗試使用Restrictions.between但它不承認CURRENT_DATE
Criteria c = session().createCriteria(Deal.class)
.add(Restrictions.between("CURRENT_DATE", "startDate", "endDate");