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 ...
随机推荐
- Anroid之Intent的使用
inten常见动作:MAIN_ACTION(主视图). VIEW_ACTION(查看). EDIT_ACTION(修改). PICK_ACTION(选择) .GET_CONTENT_ACTION(获取 ...
- 关闭“编辑窗体”后, 主窗体的DatagridView刷新数据的问题
问题:在关闭一个窗体2后,要刷新窗体1内的datagridview的数据,直接窗体1.datagridview.datasource=dt 是没用的. 解决办法如下: 在主窗体里 创建编辑窗体时 加上 ...
- ### C++总结-[类的继承]
面向对象中关于继承的总结. #@author: gr #@date: 2015-07-26 #@email: forgerui@gmail.com 一.类的隐藏 重载(overload).覆盖(ove ...
- 第六篇、AVplayer定制视频播放控件
1.引用头文件#import AVFoundation 2.自定义AVPlayer(播放的机器) 3.自定义AVPlayerItem(胶片) >> 视频的URL转成AVAsset 4.AV ...
- office2013发布博客
0, 喜欢用world记笔记,并查上一些配图.但是再想重新发到博客上,图片不得不重新上传十分蛋疼. world直接发布博客功能太棒了,直接绑定账号和url就可以发送了,爽YY!!! 1,新建一个博客文 ...
- 《C#高级编程》
<C#高级编程>是一本真正的C#技术"字典",长达36章.1200页的内容-涵盖了C#..NET各个方面的基础内容. 当然这本书我没有真正的看过一遍,只是在需要的时候才 ...
- spring heibernate 调用存储过程
一:参考网址 http://sunbin123.iteye.com/blog/1007556 二:示例 @Autowired @Qualifier("jdbcTemplate") ...
- c#的协变和逆变
关于协变和逆变要从面向对象继承说起.继承关系是指子类和父类之间的关系:子类从父类继承,所以子类的实例也就是父类的实例.比如说Animal是父类,Dog是从Animal继承的子类:如果一个对象的类型是D ...
- CorelDRAW 文件实用工具 CDRTools 2
随着 CorelDRAW 更新脚步越来越频繁,版本之间兼容性问题越来越突出,特别是跨版本之间打开会有很多问题,比如:文字跑位.透镜变向.位图出错.颜色改变,甚至会造成文件损坏.最好的办法就是哪一个版本 ...
- 关于yum与源码安装的LAMP或LNMP网页直接显示空白页的问题?
学习LAMP.LNMP时,遇到很奇怪的问题就是:搭建完LAMP或LNMP环境后安装PHPweb程序时,Discuz和Wordpress打不开安装向导,直接显示空白页(PHPWind9.0除外),没有任 ...