I am facing an issue after migrating from Spring Boot 2.7 to 3.1.6 where I am not able to call Postgresql Function using @Repository and @Procedure
My Postgre Function returns a table:
CREATE OR REPLACE FUNCTION abc.my_func(
firstInputBig text, dt date)
RETURNS TABLE(variableA bigint, variableB text, variableC bigint, phone character varying)
LANGUAGE 'plpgsql' ..........
Sprint Boot code calling the function in postgresql
@Repository
public interface ProcedureRepository extends CrudRepository<EntityClass, Long> {
@Procedure("abc.my_func")
List<Object[]> executeYourStoredProcedure(String compData, LocalDate prevDate);
}
The above code is working in spring-boot 2.7 but when migrating it is failing and getting error
Error procedure abc.my_func(Character varying , unknown) does. not exist
Hint: No procedure matches the given name and argument types. You might need to add explict type casts
Position : 6
I tried to look into other such solution but not able to make it
Cannot call Postgresql Function using SpringBoot 3.2.0 (using Hibernate 6)