I have a DB code:
type T_Sk is record
(
code Integer,
dat Date,
...
);
type TBL_Sk is table of T_Sk;
function FN_Sk(ADetId in Integer, ATrudoForFac in Integer, ATrudoForCex in Integer) return TBL_Sk pipelined;
Which is generate table, I think. And select from it looking like
select t.* from table(PK_DISP.FN_Sk(ADetId, ATrudoForFac, ATrudoForCex)) t
I tried to use native query with parameters
@Query(nativeQuery = true, value = "select * from (PK_DISP.FN_Sk(:detid, :factory, :cexnum))")
List<Spares> findAllByRequest(@Param("detid") int detid, @Param("factory") int factory, @Param("cexnum") int cexnum);
But when I execute with url: http://localhost:8080/api/get?detid=458194&factory=999&cexnum=2
@GetMapping("/get")
public List<Spares> getAll2(@RequestParam(value = "detid") int detid,
@RequestParam(value = "factory") int factory, @RequestParam(value = "cexnum") int cexnum){
return sparesRepository.findAllByRequest(detid, factory, cexnum);
}
I got empty response. And the DB getting request and exetute function correctly. Sometimes when I try to use another value of :detid, I getting an SQLExeption. What I do wrong? Is the @Param required @ResponseHeader isntead @RequestParam?