Hibernate: how to call a stored function returning a varchar?

前端 未结 4 1542
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 01:45

I am trying to call a legacy stored function in an Oracle9i DB from Java using Hibernate. The function is declared like this:

create or replace FUNCTION Tran         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-13 02:15

    callable = true is for calling stored procedures with {? = call ...()} syntax. Oracle's select ... from dual syntax is a normal query, so you don't need callable = true:

     
         
        select Transferlocation_Fix(:mnemonic) as retVal from dual 
     
    

提交回复
热议问题