ibatis
共 3 篇文章
ibatis中入参为List的处理方式
<select id="getCategories" parameterClass="java.util.ArrayList" resultClass="model.Category"> SELECT * FROM category <dynamic prepend="WHERE"> catid in <iterate open="(" close=")" conjunction=","> #paramList[]# </iterate> </dynamic> </select> 在iterate标签中,不能写property="paramList",会报错:Error getting or…
2011-08-05 16:39 · ibatis
IBatis: Discriminator Column Example – Inheritance Mapping(Ibatis中的继承映射)
继承映射介绍-iBATIS supports inheritance hierarchies by using a special mapping called a discriminator. Using a discriminator you can determine the type of class to be instantiated based on a value in the database. The discriminator is a part of the ResultMap and works much like a switch statement. 问题:对于…
2011-08-05 08:44 · ibatis
在IBATIS调用存储过程
procedure代码: CREATE OR REPLACE Procedure GET_MAX(a NUMBER,b NUMBER,c OUT NUMBER) IS BEGIN IF a>b THEN c:=a; ELSE c:=b; END IF; END GET_MAX; sql-map: <parameterMap id="precedureParameter" class="java.util.Map"> <parameter property="a" mode="IN"/> <parameter property="b" mode="IN"/> <parameter proper…
2011-08-04 14:50 · ibatis · Java · procedure