sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关

sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关
<typeAlias alias="TblSpPartsinfo" type="com.bn.car.biz.supply.dao.po.PartsInfoPO"/>
    <resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMap">
        <result property="id" column="id"/>
        <result property="partsCode" column="parts_code"/>
        <result property="partsName" column="parts_name"/>
        <result property="bigTitle" column="big_title"/>
        <result property="smallTitle" column="small_title"/>
        <result property="storeNum" column="store_num"/>
        <result property="grade" column="grade"/>
        <result property="costPrice" column="cost_price"/>
        <result property="marketPrice" column="market_price"/>
        <result property="retailPrice" column="retail_price"/>
        <result property="weight" column="weight"/>
        <result property="weightUnit" column="weight_unit"/>
        <result property="vol" column="vol"/>
        <result property="volUnit" column="vol_unit"/>
        <result property="partsIntroduce" column="parts_introduce"/>
        <result property="specification" column="specification"/>
        <result property="packagingList" column="packaging_list"/>
        <result property="brandIntroduce" column="brand_introduce"/>
        <result property="usage" column="usage"/>
        <result property="aftersaleService" column="aftersale_service"/>
        <result property="createdDate" column="created_date"/>
        <result property="creater" column="creater"/>
        <result property="modifiedDate" column="modified_date"/>
        <result property="modifier" column="modifier"/>
        <result property="flag" column="flag"/>
        <result property="fPartsbrandId" column="f_partsbrand_id"/>
        
        <result property="fPartstypeId" column="f_partstype_id"/>
        <result property="fSupplyinfoId" column="f_supplyinfo_id"/>
        <result property="updown" column="updown"/>
        <result property="recommend" column="recommend"/>
        <result property="partsSource" column="parts_source"/>
        <result property="fPartstypeId2" column="f_partstype_id2"/>
        <result property="unionFlag" column="union_flag"/>
    </resultMap>
<!-- 组合产品子产品 -->
    <resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMapWithUnion" extends="TblSpPartsinfoResultMap">
        <result property="lessPrice" column="less_price"/>
        <result property="newPrice" column="new_price"/>
    </resultMap>
<resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMapBaoyang" extends="TblSpPartsinfoResultMap">
        <result property="fCareId" column="f_care_id"/>
        <result property="fCareItemId" column="f_care_item_id"/>
    </resultMap>
sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关

注意:extends="TblSpPartsinfoResultMap" 表示继承关系。

映射的字段顺序无关~!!,但是数量,名称与sql查询语句相等,名称写错了会报错,因为映射找不到。

sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关

上一篇:Java——分页 Servlet + Jsp+Jdbc 有点瑕疵


下一篇:asp.net MVC日志插件Log4Net学习笔记二:保存日志到sqlserver的配置