标签:order type 多个 tom soc property code mybatis color
<!--顾客信息表,其中一个顾客对应一个国家,一个顾客对应多个订单--> <resultMap id="customerResultMap" type="com.mc.dto.Customer"> <id column="ID" property="id"> <result column="CUS_NAME" property="cusName"> <!--顾客和国家关系是:一对一--> <association column="country_id" property="Country" javaType="Country"> <id column="cId" property="id"> <result column="cName" property=“name”> </association> <!--顾客和订单关系是:一对多--> <collection propety="orders" ofType="com.mc.dto.Order"> <result column="o_id" property="id"> <result column="o_price" property="price"> </collection> </resultMap>
标签:order type 多个 tom soc property code mybatis color
原文地址:http://www.cnblogs.com/LiuChunfu/p/7062306.html