【发布时间】:2020-01-30 08:26:32
【问题描述】:
我在调用存储过程时遇到问题
create or replace PROCEDURE TProc1
(i_cob_date IN DATE,
i_location IN VARCHAR2,
o_ret OUT VARCHAR2
)
AS
BEGIN
--logic to update a table based on i_cob_date
o_ret := '0';
commit;
END TProc1;
public interface MyRepository extends CrudRepository<MyEntity, Long> {
@Query(value = "call TProc1(:i_cob_date, :i_location)", nativeQuery = true)
String markStatus(@Param("i_cob_date")Date cobDate, @Param("i_location")String location);
}
我正在使用 SpringBoot 和 Spring Data JPA,当我尝试调用我得到以下错误的方法时。
Could not extract the ResultSet
Caused by: java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call to 'TProc1'
【问题讨论】:
标签: java jpa stored-procedures spring-data-jpa spring-data