在ibaties2里面是通过procedure标签执行存储过程,但是在ibaties3里已经将此标签移除了.改为使用select,update,insert标签执行
<procedure id="getValues" parameterMap="getValuesPM"> { ? = call pkgExample.getValues(p_id => ?) } </procedure>
需要改成:
<select id="getValues" parameterMap="getValuesPM" statementType="CALLABLE"> { ? = call pkgExample.getValues(p_id => ?)} </select>
如果你调用一个insert的带返回值的存储过程,你可以使用<select>标签代替<insert>,但是你需要设置 specify useCache="false" 和 flushCache="true",你还必须做一个强制提交(事务)。
- 对返回数据集的存储过程,当使用嵌套的resultMap时,这儿有一个bug(看 issue 30 ) (例如:出参resultMap包含一个<association> 标签). 只要问题没有解决,你必须自己将resultMap定义好,或者嵌套的内容不会被填充。