|
I need to invoke a Oracle function that has DML inside and the function dont have parameters.
I tried something like that <parameterMap type="com.myCompany.myObject" id="myMap"> <parameter property="myPropertie" javaType="java.lang.Integer" jdbcType="NUMERIC" mode="OUT"/> </parameterMap> <select id="callFunction" parameterMap="myMap" statementType="CALLABLE"> { ? = CALL fnc_myFunction }</select>myPropertie' of 'class org.apache.ibatis.reflection.MetaObject$NullObject' with value '24272' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'myPropertie' in 'class java.lang.Class'myMap### The error occurred while setting parametersmyPropertie' of 'class org.apache.ibatis.reflection.MetaObject$NullObject' with value '24272' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'myPropertie' in 'class java.lang.Class'MyPropertie(Integer xxx)"Thanks in Advance |
|
I tried this and it worked fine:
<parameterMap type="...mapper.SystemMapper$CallParam" id="callParam"> <parameter property="dbId" jdbcType="INTEGER" mode="OUT" javaType="_int"/> </parameterMap> <update id="getDbIdDirect" statementType="CALLABLE" parameterMap="callParam"> {call #{dbId} := db_id()} </update> public interface SystemMapper { public class CallParam { private int dbId; public int getDbId() { return dbId; } public void setDbId(int dbId) { this.dbId = dbId; } } void getDbIdDirect(CallParam param); } It was interesting that when I changed "update" to "select" java process hanged up... Let's try to change "
{ ? = CALL fnc_myFunction } " to "{ CALL #{myPropertie} = fnc_myFunction } ". I think it'll behave much better ) Andrew Shalin четверг, 22 марта 2012 г. 1:01:23 UTC+4 пользователь Tyrion написал: I need to invoke a Oracle function that has DML inside and the function dont have parameters. |
| Powered by Nabble | Edit this page |
