码迷,mamicode.com
首页 > 移动开发 > 详细

mybatis mapper xml文件配置resultmap时,id行和result行有什么区别?

时间:2017-06-19 13:15:08      阅读:1936      评论:0      收藏:0      [点我收藏+]

标签:register   custom   type   文件   customer   entity   字段   配置   ice   

mybatis mapper xml文件配置resultmap时,id行和result行有什么区别?

<resultMap id = "CashInvoiceMap" type="com.dfire.soa.invoice.bo.Invoice">
    <id column="id" property="id" />
    <result column="order_id" property="orderId" />
    <result column="customer_register_id" property="customerRegisterId" />
    <result column="entity_id" property="entityId" />
    <result column="invoice_kind" property="invoiceKind" />

</resultMap>

 

property:javabean的属性名,propertyjavabean的属性名。

column:数据库的字段名,column:数据库的字段名。

mybatis mapper xml文件配置resultmap时,id行和result行有什么区别?

标签:register   custom   type   文件   customer   entity   字段   配置   ice   

原文地址:http://www.cnblogs.com/panxuejun/p/7047777.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!