我想知道将如何执行以下查询中的比较:StringBuilder queryStr = new StringBuilder();queryStr.append("SELECT o FROM PRDBook as o WHERE ") .append("o.publicationDate < :now");Query query = entityManager.createQuery(queryStr.toString());Date now = new Date();query.setParameter("now", now);在数据库中,列的publicationDate类型为timestamp without time zone。此列中的示例值:2018-03-01 18:00:00结果now.toString()是:Wed Aug 22 16:14:03 CEST 2018是否会以这种方式进行上述数据之间的比较:2018-03-01 18:00:00 < 2018-08-22 16:14:03或者那样:2018-03-01 18:00:00 < 2018-08-22 14:14:03
添加回答
举报
0/150
提交
取消