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>
注意:extends="TblSpPartsinfoResultMap" 表示继承关系。
映射的字段顺序无关~!!,但是数量,名称与sql查询语句相等,名称写错了会报错,因为映射找不到。
sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关的更多相关文章
- Mybatis按SQL查询字段的顺序返回查询结果
在SpringMVC+Mybatis的开发过程中,可以通过指定resultType="hashmap"来获得查询结果,但其输出是没有顺序的.如果要按照SQL查询字段的顺序返回查询结 ...
- sql查询字段是否为空
sql 查询某字段为空 select * from 表名 where 字段名 is null sql 查询某字段不为空 select * from 表名 where 字段名 is not null s ...
- Mybatis按照SQL查询字段的顺序返回查询结果,使用resultType="java.util.LinkedHashMap"
在使用Mybatis开发时,Mybatis返回的结果集就是个map,当返回map时只需要做好SQL映射就好了,减少了代码量,简单便捷,缺点是不太方便维护,但是写大量的vo类去返回也挺累的,这个看你个人 ...
- SQL查询字段,起别名,列参与数学运算
13.简单查询 13.1.查询一个字段? select 字段名 from 表名: 其中要注意: select和from都是关键字 字段名和表名都是标识符. 强调: 对于SQL语句说,是通用的 所有的S ...
- sql 查询字段是中文/英文/数字 正则表达式
一.包含中文字符 select * from 表名 where 列名 like '%[吖-座]%' 二.包含英文字符 select * from 表名 where 列名 like '%[a-z]%' ...
- SQL 查询字段为值不为空
方法一sql="select * from table where id<>null " or sql="select ...
- sql 查询字段如果为null 则返回0的写法
oracle select nvl(字段名,0) from 表名; ----------------------------------- sqlserver select isnull(字段名,0) ...
- sql查询字段中的值长度最大的记录
SELECT max(length(字段)) FROM 表名;
- sql查询字段值长度判断是否18位
SELECT * FROM 表名 WHERE LENGTH(字段)= OR 字段为null IS NULL OR 字段为空='' SELECT * FROM 表名 WHERE LENGTH(字段)&g ...
随机推荐
- 转 Android 4.0后,自定义Title报错 You cannot combine custom titles with other title feature
自定义Titlebar时为了避免冲突 需要修改:AndroidManifest.xml android:theme="@style/mystyle" styles.xml文件中 ...
- 初学Android: 四大组件之Activity
1.activity (1)一个Activity通常就是一个单独的屏幕(窗口),简单来说activity就是一个交互界面,一般应用程序都要由一个或者多个activity组成. (2)Activity之 ...
- Aliyun OSS SDK 异步分块上传导致应用异常退出
问题描述: 使用Aliyun OSS SDK的BeginUploadPart/EndUploadPart执行异步分块上传操作,程序出现错误并异常退出! 原因分析: Using .NET Framewo ...
- PHP自定义日期英文格式 Feb 11,2015
背景:[PHP小工具]项目中,经常会要求多版本语言支持,而日期也是必不可少的组成元素. 英文日期书写顺序分英式和美式,举例如. 美国:月日年(January 8th,2014 或 January 8, ...
- 在String()构造器不存在的情况下自定义一个MyString()函数,实现如下内建String()方法和属性:
在String()构造器不存在的情况下自定义一个MyString()函数,实现如下内建String()方法和属性: var s = new MyString("hello"); s ...
- NFC规范学习之一 ---整体结构
1.NFC 采用两个感应线圈进行数据交互,其中至少必须有一个设备产生13.56MHZ的磁场,该场被调制以方便数据传输.通讯中,一个设备处于initiator模式(就是发起通讯)另外一个设备则工作在ta ...
- 09_rlCoachKin讲解
在Socket.cpp中Socket::readClient()函数中就是解析读取到的内容的. 对于我们发送的2 0 1.57 0.31 0 0 1.57 0,那么就会进入如下分支: 也就是进入2号处 ...
- 'WinMain' : function cannot be overloaded
Create a MFC Application (UNICODE), paste following code in one of your cpp file. int APIENTRY WinMa ...
- log4net基本日志使用笔记[windows application]
Ref: http://www.cnblogs.com/wangsaiming/archive/2013/01/11/2856253.html http://www.cnblogs.com/zhouf ...
- [ Windows] [ OS ] [ Remote Desktop ] 開啟同一個帳號同時2的連線RDP的方式
感謝同事 Allen 的Support :) 執行>gpedit.msc 電腦設定>Windows元件>遠端桌面服務>遠端桌面工作階段主機>連線>限制遠端桌面服務的 ...