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的更多相关文章

  1. spring boot 2.0.0 + mybatis 报:Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

    spring boot 2.0.0 + mybatis 报:Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required 无法启动 ...

  2. java mybatis Column 'AAA' in where clause is ambiguous

    今天在java mybatis项目中遇到一个问题,“java mybatis Column 'AAA' in where clause is ambiguous”, 这是由于在多表连接查询的时候,遇上 ...

  3. Mybatis的ResultMap对column和property

    首先,先看看这张图,看能不能一下看明白:   select元素有很多属性(这里说用的比较多的): id:命名空间唯一标识,可以被用来引用这条语句 parameterType:将会传入这条语句的参数类的 ...

  4. Springboot 2.0.4 整合Mybatis出现异常Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

    在使用Springboot 2.0.4 整合Mybatis的时候出现异常Property 'sqlSessionFactory' or 'sqlSessionTemplate' are require ...

  5. springBoot中mybatis错误之 Property 'configuration' and 'configLocation' can not specified with together 解决

    mybatis.config-location与mybatis.config-locations不同 mybatis.config-location不加载全局配置文件

  6. 解决mybatis中 数据库column 和 类的属性名property 不一致的两种方式

    解决方式way1:resultMap (1)studentMapper.xml <!-- 当数据库的字段名 和 类的属性名 不一致的时候的解决方式:2种 way1--> <selec ...

  7. 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 ...

  8. 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'

    现在流行的 ssm(spring + struts2 + myBatis)  持久层的mybatis是需要配置映射器的,找了个demo连接的数据库是MySQL 于是就修改了一下弄成了连接Oracle的 ...

  9. mybatis父查询值嵌套传递/column传入多个参数值

    mybatis中collection的column传入多个参数值(使用父查询的映射值) property description column 数据库的列名或者列标签别名.与传递给resultSet. ...

随机推荐

  1. openstack中数据库连接数太多--pymysql.err.OperationalError,1040, u'Too many connections'

    1.出现问题: openstack运行过程中出现如下问题: OperationalError: (pymysql.err.OperationalError) (1040, u'Too many con ...

  2. Lab 1-1

    LABS The purpose of the labs is to give you an opportunity to practice the skills taught in the chap ...

  3. 使用C#读取网站相对路径文件夹下所有图片

    public JsonResult GetCourseInitCover() { //设置相对路径 string imgurl = Server.MapPath("~/Content/ima ...

  4. A strange lift HDU - 1548

    There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 ...

  5. eclipse指定jdk路径

  6. QQ企业邮箱接口

    我推荐的这篇文章很好:http://wenku.baidu.com/link?url=KQIMyrECGb8GS_0fag4PRG64M8Z7wOLbsU1f3BhydXAyYJDC2JMHEuVcy ...

  7. hdu 1025LIS思路同1257 二分求LIS

    题目: Constructing Roads In JGShining's Kingdom Time Limit: 2000/1000 MS (Java/Others)    Memory Limit ...

  8. git如何merge github forked repository里的代码更新?(转)

    参考内容:git如何merge github forked repository里的代码更新? [refer to ]http://www.haojii.com/2011/08/how-to-git- ...

  9. MySQL Workbench中如何开启MySQL的远程帐号

    '; /* 上面的语句表示将 discuz 数据库的所有权限授权给 root这个用户,允许 root用户在192.168.119.120进行远程登陆,并设置 root用户的密码为 123456 . 下 ...

  10. nginx配置location总结及rewrite规则写法(1)

    1. location正则写法 一个示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } location / { # 因为 ...