- 今天使用 jpa 的 @Query 这个注解查询数据时,sql语句语法出现了错误,记录下来。
- 我的错误写法是这样的
@Query(value = "select * from tb where DATE_FORMAT(start_time,'%Y-%m-%d')=DATE_FORMAT(startTime,'%Y-%m-%d')", nativeQuery = true) List<PlanExecutionEntity> findByStartTime(Date startTime);
使用jpa的@Query注解查询数据库中datatime类型数据报错Unknown column 'startTime' in 'where clause'
最新推荐文章于 2023-01-08 22:06:57 发布