Ibatis:There is no READABLE property named 'member_id' in class 'java.lang.String'
来源:互联网 发布:淘宝链接转换器在线 编辑:程序博客网 时间:2024/05/22 10:55
参考:http://blog.csdn.net/will_awoke/article/details/8778531
原有的错误配置:
- <select id="selectMembers" resultClass="TMember" parameterClass="java.lang.String">
- select * from t_member m
- where
- 1=1
- <dynamic>
- <isNotEmpty prepend="and" property="member_id">
- m.member_id = #member_id#
- </isNotEmpty>
- </dynamic>
- </select>
修正结果1(判断传参是否非空):
- <select id="selectMembers" resultClass="TMember" parameterClass="java.lang.String">
- select * from t_member m
- where
- 1=1
- <dynamic>
- <isNotEmpty prepend="and" property="value"> <!-- 此处property设置为value,ibatis默认 -->
- m.member_id = #value:VARCHAR#
- </isNotEmpty>
- </dynamic>
- </select>
修正结果2(直接使用):
- <select id="selectMembers" resultClass="TMember" parameterClass="java.lang.String">
- select * from t_member m
- where 1=1 AND m.member_id = #member_id:VARCHAR#
- </select>
说明:
1.parameterClass设置成了java.lang.String, 而property代表parameterClass这个类中的某个属性
2.处不可以添加property来指定传参名字,因为String类里边没有我们指定名称的属性; 或者设置property="value",Ibatis默认许可
3.去掉property可直接取值,取值方式是与调用方法中的参数名称一致
0 0
- Ibatis:There is no READABLE property named 'member_id' in class 'java.lang.String'
- Ibatis:There is no READABLE property named 'userName' in class 'java.lang.String'
- Ibatis:There is no READABLE property named 'roomNo' in class 'java.lang.String'
- There is no READABLE property named 'day' in class 'java.lang.String';You have an error in your SQL
- There is no READABLE property named 'id' in class 'java.lang.Integer'
- com.ibatis.common.beans.ProbeException: There is no READABLE property named 'propertyName' in class 'className'
- Ibatis中的一个“There is no READABLE property named 'uId' in class 'useri 的解决办法
- com.ibatis.common.beans.ProbeException: There is no READABLE property named 'baiduIndex' in class 'j
- com.ibatis.common.beans.ProbeException: There is no READABLE property named 'baiduIndex' in class '
- There is no READABLE property named ' ' in class ' '
- ProbeException解决办法:There is no WRITEABLE property named 'id' in class 'java.lang.String'
- There is no getter for property named '**' in 'class java.lang.String
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'
- Mybatis-There is no getter for property named 'XXX' in 'class java.lang.String'解决办法
- Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'
- mybatis:There is no getter for property named 'xxx' in 'class java.lang.String'
- There is no getter for property named '**' in 'class java.lang.String'
- 神经元芯片未必能模拟出脑,应仿互联网建立人工智能大脑模型
- 学习opencv(3)——cvRodrigues2()、cvMatMulAdd()
- 类适配器模式
- 解决用浏览器打开本地Android API很慢的问题
- php如何处理高并发,整理
- Ibatis:There is no READABLE property named 'member_id' in class 'java.lang.String'
- LeetCode 289 Game of Life
- loadrunner 调用webservice 抛出 Internal error,please call customer support.Details:class java.lang.Objec
- 程序员学习能力提升三要素
- shouldAutorotateToInterfaceOrientation 不触发或者不执行的问题 转载
- CUDA下在Host端分配的几种内存模式
- UI之targetAction
- Junit工具类--读取xml文件
- 获取当前线程状态