日期:2014-05-16  浏览次数:20503 次

ibatis3 一对多配置
ibatis3 一对多配置
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">

<mapper namespace="ActivityStatsMapper">
	<resultMap id="customerWrapResultMap" type="com.demo.bean.CustomerWrap">
		<id column="ID" property="id"/>
		<collection property="customers" column="ID" javaType="ArrayList" ofType="com.demo.bean.Customer" >
			<result column="NAME" property="name"/>
			<result column="EMAIL" property="email"/>
			<result column="ADDRESS" property="address"/>
		</collection>
	</resultMap>
</mapper>