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

时间:2017-06-19 11:33:44   收藏:0   阅读:2937

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:数据库的字段名。

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!