我想从表中选择date = TODAY,在mysql上where date > CURDATE(),如何在JPA命名查询中执行此操作?
McD*_*ell 33
从规格:
4.6.16.3日期时间函数
Run Code Online (Sandbox Code Playgroud)functions_returning_datetime:= CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMPdatetime函数返回数据库服务器上当前日期,时间和时间戳的值.
Chs*_*y76 19
这取决于您的JPA提供商.例如,Hibernate支持current_date()函数:
from MyEntity where myDateProperty > current_date()
Run Code Online (Sandbox Code Playgroud)