mybatis column 和property
mybatis map文件中 resultMap中column和sql查询结果对应, property和实体private对应
<resultMap id="VideoYcAppResultMap" type="com.video.core.pojo.VideoYcApp" >
<id column="CarId" property="carId" jdbcType="BIGINT" />
<id column="VideoId" property="videoId" jdbcType="BIGINT" />
</resultMap>
<sql id="Base_Column_List_Video_App">
c.CarId,v.VideoId,v.Title,v.TotalVisit,v.TotalComment,v.CreatedDate,v.ImageLink,vr.MobileFileLink,Type=2
</sql>
public class VideoYcApp implements Serializable {
private Long carId;
private Long videoId;
private String title;
public Long getCarId() {
return carId;
}
public void setCarId(Long carId) {
this.carId = carId;
}
public Long getVideoId() {
return videoId;
}
public void setVideoId(Long videoId) {
this.videoId = videoId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
mybatis column 和property的更多相关文章
- spring boot 2.0.0 + mybatis 报:Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
spring boot 2.0.0 + mybatis 报:Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required 无法启动 ...
- java mybatis Column 'AAA' in where clause is ambiguous
今天在java mybatis项目中遇到一个问题,“java mybatis Column 'AAA' in where clause is ambiguous”, 这是由于在多表连接查询的时候,遇上 ...
- Mybatis的ResultMap对column和property
首先,先看看这张图,看能不能一下看明白: select元素有很多属性(这里说用的比较多的): id:命名空间唯一标识,可以被用来引用这条语句 parameterType:将会传入这条语句的参数类的 ...
- Springboot 2.0.4 整合Mybatis出现异常Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
在使用Springboot 2.0.4 整合Mybatis的时候出现异常Property 'sqlSessionFactory' or 'sqlSessionTemplate' are require ...
- springBoot中mybatis错误之 Property 'configuration' and 'configLocation' can not specified with together 解决
mybatis.config-location与mybatis.config-locations不同 mybatis.config-location不加载全局配置文件
- 解决mybatis中 数据库column 和 类的属性名property 不一致的两种方式
解决方式way1:resultMap (1)studentMapper.xml <!-- 当数据库的字段名 和 类的属性名 不一致的时候的解决方式:2种 way1--> <selec ...
- Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'orderdetails' of 'class com.luchao.mybatis.first.po.Orders' with value 'Orderdetail [id=null, ordersId=3, itemsId=1, it
从上面异常的解释来看是因为反射不能将Orders设置到orderdetails属性上,仔细检查了MyBatis的配置文件,发现: <collection property="order ...
- 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'
现在流行的 ssm(spring + struts2 + myBatis) 持久层的mybatis是需要配置映射器的,找了个demo连接的数据库是MySQL 于是就修改了一下弄成了连接Oracle的 ...
- mybatis父查询值嵌套传递/column传入多个参数值
mybatis中collection的column传入多个参数值(使用父查询的映射值) property description column 数据库的列名或者列标签别名.与传递给resultSet. ...
随机推荐
- English trip V1 - B 6.Where Are You From? Teacher:Patrick Key: 一般疑问句和否定句中的be动词
In this lesson you will learn to talk about countries and languages. 本节课你将学习到关于谈论城市和语言 课上内容(Lesson) ...
- 20180821ImportContactFromExcel
Excel创建vcf文件,借助百度云助手导入Iphone6Plus Sub CreateContractList() Set Wb = Application.ThisWorkbook FilePat ...
- js将字符串转json
Json格式字符串 "{"rows":[{"date":"2018-11-19","money":" ...
- lanmp中环境变量的更改方法
1.vim /etc/profile 改成: export PATH=$PATH:/www/wdlinux/phps/71/bin/ 然后运行: source /etc/profile
- linux配置hadoop集群
①安装虚拟机 ②为虚拟机添加共享文件 右击已经安装好的虚拟机 设置—>选项—>共享文件 ③配置映射 sudo nano /etc/network/interfaces 重启网络:sud ...
- 兼容IE8的video写法
<video width="100%" height="515px" controls preload> <source src=" ...
- Leetcode 999. 车的可用捕获量
999. 车的可用捕获量 显示英文描述 我的提交返回竞赛 用户通过次数255 用户尝试次数260 通过次数255 提交次数357 题目难度Easy 在一个 8 x 8 的棋盘上,有一个白色车(r ...
- GIS入门基础知识点
自从国企辞职以后,找了一份关于GIS开发的工作,好多从事这个都是地理信息科学方面的专业.由于自己才疏学浅,只能从头入门学起,先是大致了解公司的业务以及产品,学习一下相关地理信息的基础知识. 首先今天简 ...
- 前端基础之http协议
B-S模式: browser------>server BS模式工作过程: 用户在 browser 输入一个URL 确定要访问的server browser发送 post/get请求 给serv ...
- ssh和ssl的联系和区别
ssh:Secure Shell,安全Shell,是一个软件,处于应用层旨在取代明文通信的telnet:对应的开源实现程序是openssh. ssl:Secure Sockets Layer,安全套接 ...