association ,collection
2016-04-21 18:17
363 查看
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>
相关文章推荐
- C. Removing Columns
- 【编译原理】求First集和Follow集
- Http 请求原理简介
- linux异步IO编程实例分析
- android学习笔记——Socket简单介绍
- android学习笔记——蓝牙介绍
- CSS中font-style的属性有Italic oblique,它们俩的区别是什么呢?
- ZOJ 3609 Modular Inverse【同余问题】
- 程序媛的好习惯
- 中间表--简例说明
- iOS环信3.0集成 (二)UI文件集成
- C和指针第四章编程练习
- android学习笔记——MVP模式介绍
- Android adb logcat使用技巧
- 数字图像处理,相位相关图像配准算法的C++实现
- CardView,android代码设置颜色没效果,解决
- SharePoint 2013 创建我的站点、onedrive
- Android 6.0 动态权限申请注意事项
- iOS开发 贝塞尔曲线UIBezierPath
- 使用kickstart脚本安装CentOS7