Sto cercando di ottenere un valore restituito (un valore intero) da una funzione memorizzata in Oracle 11g.valore di ritorno Mybatis
La funzione aggiunge 10 al numero di ingresso:
FUNCTION ADD_TEN(INPUT IN NUMBER) RETURN NUMBER IS
BEGIN
RETURN INPUT + 10;
END;
Nella mia interfaccia mapper ho la linea:
Integer add(Integer input);
E in file XML
<select id="add" statementType="CALLABLE" resultType='java.lang.Integer'>
{#{output,mode=OUT,jdbcType=NUMERIC,javaType=Integer} = call test_pkg.ADD_TEN(
#{input,jdbcType=NUMERIC}) }
</select>`
La chiamata a il metodo è come:
Integer sum = mapper.add(45);
Ma sto ottenendo il seguente errore:
Could not set property 'output' of 'class java.lang.Integer' with value '55' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'output' in 'class java.lang.Integer'
Che cosa sto facendo di sbagliato? Sono davvero perso con questo ...
Grazie.