java LocalDateTime通过StoredProcedureQuery转换为bytea
使用Java 8、Spring 4.3.9和Postgre数据库
我有一个存储函数,定义如下:
CREATE OR REPLACE FUNCTION public.getinformations (
IN stateId integer,
IN dateStart timestamp,
IN dateEnd timestamp
)
RETURNS SETOF DECLAREDTYPE
LANGUAGE plpgsql
AS $$ [...]
我想在春季将其称为二手StoredProcedurery:
StoredProcedureQuery query = entityManager.createStoredProcedureQuery("public.getinformations ")
.registerStoredProcedureParameter("stateId",Long.class,ParameterMode.IN)
.registerStoredProcedureParameter("dateStart",LocalDateTime.class,ParameterMode.IN)
.registerStoredProcedureParameter("dateEnd",LocalDateTime.class,ParameterMode.IN);
但是当函数被提取时,我得到了以下错误:
ERROR: function public.getinformations (bigint, bytea, bytea) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
共 (0) 个答案