有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何在Spring Boot中编辑查询?

我有一个存储库,我需要找到id和日期的数据

我写这段代码:

@Query(value = "select * from cheer.coordinate where childid = ?1 and CAST(creationdate as DATE) = ?2",
nativeQuery = true)
List<Coordinate> findAllByChildidAndDate(@Param("childid") Long childid, @Param("date") String date);

但当我尝试使用它时,我得到了一个错误:

org.postgresql.util.PSQLException: ERROR: operator does not exist: date = character varying

如何修复它


共 (0) 个答案