association ,collection
mybatis 出现这个错误
Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 24; columnNumber: 17; 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminator?)"
原因是 association ,collection 的出现必须按照(constructor?,id*,result*,association*,collection*,discriminator?)的先后顺序
<resultMap id="BaseResultMap" type="com.aixuexi.train.entity.Course">
<id column="ID" property="id" jdbcType="INTEGER"/>
<result column="SERIES_ID" property="seriesId" jdbcType="INTEGER"/>
<result column="NAME" property="name" jdbcType="VARCHAR"/>
<result column="STATUS" property="status" jdbcType="VARCHAR"/>
<result column="COURSE_TYPE" property="courseType" jdbcType="VARCHAR"/>
<result column="IMG_URL" property="imgUrl" jdbcType="VARCHAR"/>
<result column="START_TIME" property="startTime" jdbcType="TIMESTAMP"/>
<result column="END_TIME" property="endTime" jdbcType="TIMESTAMP"/>
<result column="CONDITIONS" property="conditions" jdbcType="VARCHAR"/>
<result column="SUIT" property="suit" jdbcType="VARCHAR"/>
<result column="INTRODUCE" property="introduce" jdbcType="LONGVARCHAR"/>
<association property="messageObject"
column="ID"
select="com.aixuexi.train.mapper.MessageObjectMapper.selectByPrimaryKey"/>
<collection property="lectruers"
ofType="com.aixuexi.train.entity.Lectruer"
column="id"
javaType="java.util.ArrayList"
select="com.aixuexi.train.mapper.CourseLectruerMapper.selectByCourseId"/>
</resultMap>
association ,collection的更多相关文章
- mybatis mapper association collection
1.Question Description: sometimes, POJO bean contains another bean or collection as property, it's s ...
- 解决 Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat
在配置 mybatis mapper.xml文件时, 一不小心就会报如下类似的异常: Caused by: org.springframework.beans.factory.BeanCreation ...
- mybatis项目启动报错 The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".
启动项目报错 2018-02-26 17:09:51,535 ERROR [org.springframework.web.context.ContextLoader] - Context initi ...
- Mybatis 高级结果映射 ResultMap Association Collection
在阅读本文章时,先说几个mybatis中容易混淆的地方: 1. mybatis中的列不是数据库里的列而是查询里的列,可以是别名(如 select user_name as userName,这时col ...
- 错误Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat
今天算是见识了什么事顺序的重要性. 在使用mybatis时由于联合了其他的表,用到了resultMap,之后外加association这一项.可是在替换对应字段的位置上加上association总是报 ...
- mybatis学习(八)——resultMap之association&&collection解析
一.resultMap的使用 resultMap 也是定义返回值类型,返回值为用户自定义的类型,可用于解决JavaBean中的属性名和数据库中的列名不一致的情况 之前对于JavaBean中属性名和数据 ...
- Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat
<resultMap id="BaseResultMap" type="com.youotech.tl_cons_credit_rating.entity.TL_C ...
- collection和association的区别于关系
比如同时有User.java和Card.java两个类 User.java如下: public class User{ private Card card_one; private List<C ...
- mybatis association和collection标签怎么用
<resultMap type="Bill" id="ResultBill"> <id property="id" col ...
随机推荐
- 如何查看tensorflow版本与存储位置
import tensorflow as tf tf.__version__ __看着是一个下划线,实际上是两个下划线,中间有空格 tf.__path_
- 2016年10月31日 星期一 --出埃及记 Exodus 19:16
2016年10月31日 星期一 --出埃及记 Exodus 19:16 On the morning of the third day there was thunder and lightning, ...
- OS开发(Objective-C)常用库索引
code4app.com 这网站不错,收集各种 iOS App 开发可以用到的代码示例 cocoacontrols.com/ 英文版本的lib收集 objclibs.com/ 精品lib的收集网站 h ...
- VC++检测当前网络状态
VC获得本机网络连接状态 转载:http://www.cppblog.com/wrhwww/archive/2010/12/02/135230.html //本机网络连接类型(成功) #define ...
- GitHub如何在自己的Stars中进行搜索
默认的搜索结果,仅仅搜索原创的repository 想要搜索的时候,能够搜索到fork出来的repository的话 在关键字后面加上空格 fork:true
- 并行parallel和并发concurrent的区别
http://stackoverflow.com/questions/1050222/concurrency-vs-parallelism-what-is-the-difference Concurr ...
- [HDU5727]Necklace(二分图最大匹配,枚举)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5727 题意:有N个阴珠子和N个阳珠子,特定序号的阴阳珠子放在一起会让阳珠子暗淡.现在问排放成一个环,如 ...
- JAVA查找--[二分查找]
package com.array; public class BinaryFind { /* * 项目名称:二分查找 ; * 项目要求:用JAVA对数组进行查找,并运用快速查找算法; * 作者:Se ...
- ettercap
作者: 官网:http://ettercap.github.io/ettercap/ 源码:https://github.com/Ettercap/ettercap 功能:arp欺骗
- flex布局注意点:
1.父元素display:flex之后成为伸缩容器,子元素(除了position:absolute或fixed)无论是display:block或者display:inline,都成为了伸缩项目.2. ...