Home > database >  Consult everybody, use mybatis call oracle stored procedure, how to match the OUT types of nested ta
Consult everybody, use mybatis call oracle stored procedure, how to match the OUT types of nested ta

Time:09-18

Such as I have an OUT type stored procedure parameters of nested tables, as shown in figure


Nested table definition:
 CREATE OR REPLACE TYPE array_context IS TABLE OF varchar2 (100); 


Then use mybatis calls, XML code is:
 & lt; Select id="querySQL" statementType="CALLABLE parameterType"="Java. Util. HashMap" & gt; 
Call proc_querysql (
# {querySQL, mode=IN, jdbcType=VARCHAR},
# {resultList mode=OUT, jdbcType=ARRAY}
)


Service code for:
 Map Params=new HashMap (a); 
Params. Put (querySQL, SQL);
QuerySQLDao. QuerySQL (params);


But every time I called, why always quote: Cause: Java, SQL. SQLException: ORA - 06553: PLS - 306: wrong number or types of the arguments in the call to 'PROC_QUERYSQL error? Don't mybatis can't use nested tables parameters?
  • Related