MyBatis学习_1_ Result Maps collection does not contain value for *
来源:互联网 发布:c语言如何判断闰年 编辑:程序博客网 时间:2024/06/01 13:53
刚刚开始学习mybatis,希望能把在学习过程中的感受和遇到的问题记录下来,以供之后查看也希望能够帮助和我一样的新手。
- “ Result Maps collection does not contain value for *“的问题
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><!-- 映射文件, parameterType 为在SqlMapConfig.xml中为类起的别名 --><mapper namespace="com.leecode.mybatis.helloworld.Student"><sql id="baseSql">SELECT * FROM</sql><insert id="save" parameterType="Student">INSERT INTO T_STUDENT (NAME, SEX, AGE, NATIVEPLACE) VALUES (#{name}, #{sex}, #{age}, #{nativePlace})</insert><select id="selectOne" parameterType="int" resultType="Student"> <include refid="baseSql"/> T_STUDENT WHERE ID = #{id}</select><select id="selectAll" resultMap="Student"> <include refid="baseSql"/> T_STUDENT</select></mapper>需要说明的是,在映射文件中只要有一个resultMap活resultType属性指向错误,在这个文件中的其他正确的语句也不能执行所以在出现以上错误时并不一定是正在执行的语句的错误,也可能是当前文件中其他语句的错误,需要仔细检查,我这里就是因为id为“selectAll”的select标签中的resultType错写成了resultMap造成了错误(见上边的代码)。
- MyBatis学习_1_ Result Maps collection does not contain value for *
- Result Maps collection does not contain value for
- Result Maps collection does not contain value for frontpreviewprofitManage.cdata
- Result Maps collection does not contain value for StudentMapper.StudentMap
- Result Maps collection does not contain value for 问题
- java mybatis:Result Maps collection does not contain value for java.lang.Long
- Mybatis 错误:Result Maps collection does not contain value for java.util.Map
- MyBatis:Parameter Maps collection does not contain value for
- mybatis报错(三)报错Result Maps collection does not contain value for java.lang.Integer解决方法
- Result Maps collection does not contain value for java.lang.Integer
- Result Maps collection does not contain value for java.lang.Long
- Result Maps collection does not contain value for java.lang.Integer
- Result Maps collection does not contain value for java.lang.Long 错误
- Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com
- Result Maps collection does not contain value for java.util.Map
- 关于Result Maps collection does not contain value for....错误原因总结
- Parameter Maps collection does not contain value for XXX.map
- MyBatis中报错:Parameter Maps collection does not contain value for 的问题解决
- ASP.NET MVC 项目结构与核心的DLL
- 【总结】Div-CSS
- 产品36记:第一,有梦想的地方
- Problem G B. Calendar Codeforces Round #183 (Div. 2)
- svn打tag脚本
- MyBatis学习_1_ Result Maps collection does not contain value for *
- javascript截取字符串(支持中英文混合)
- Qt5 在win7上发布 & 打包依赖dll生成exe方法
- onenand小结 及 与nor 和nand 的区别
- android四大组件
- Eclipse安装Svn等插件简介
- Java SE 自学笔记9 之 抽象类、接口、内部类、匿名内部类、枚举
- 屏蔽搜索引擎机器人的抓取
- eclipse svn密码修改