ProbeException解决办法:There is no WRITEABLE property named 'id' in class 'java.lang.String'
2012-07-18 17:30
585 查看
<!-- 按天统计 --> <insert id="insertVisitStatisticInfoDay" parameterClass="string"> <![CDATA[ insert into visit_statistic_day (app_id,user_num,pv,uv,visit_date) select type_id as app_id ,count(distinct username) as user_num,count(id) as pv, count(distinct ip) as uv, date_format(now_time,'%Y-%m-%d') as visit_date from superbosstongji.pv_$tbNo$ group by type_id ]]> <!--<selectKey resultClass="int" keyProperty="id"> <![CDATA[SELECT LAST_INSERT_ID() AS ID ]]> </selectKey>--> </insert>
报这种异常主要是因为你设置对象keyProperty='id' 在类型为int类型,而你传进来的是string类型
<!--<selectKey resultClass="int" keyProperty="id"> <![CDATA[SELECT LAST_INSERT_ID() AS ID ]]> </selectKey>-->这行代码主要作用时当插入成功后,返回表的索引值,访异常解决的办法是注释这行几行代码,
或者在传进来的参数值里包含keyProperty=‘id'
相关文章推荐
- 错误解决:There is no getter for property named 'id' in class 'java.lang.String'
- Mybatis 对单独传入参数string进行判断时报There is no getter for property named '**' in 'class java.lang.String解决办法
- mybaits错误解决:There is no getter for property named 'id' in class 'java.lang.Long'
- mybatis加Spring项目: 解决There is no getter for property named '***' in 'class java.lang.String'问题
- There is no getter for property named 'num' in 'class java.lang.String'。
- There is no READABLE property named 'day' in class 'java.lang.String';You have an error in your SQL
- mybatis报错 There is no getter for property named 'xx' in 'class java.lang.String
- There is no getter for property named '**' in 'class java.lang.String
- There is no READABLE property named 'id' in class 'java.lang.Integer'
- org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'funcSetId' in 'class java.lang.Integer'
- There is no getter for property named '**' in 'class java.lang.String'
- There is no getter for property named 'id' in 'class java.lang.Integer'问题解决办法
- Mybatis error,There is no getter for property named 'xx' in 'class java.lang.String',解决办法
- MyBatisSystemException There is no getter for property named 'id' 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'解决办法
- mybaits错误解决:There is no getter for property named 'id' in class 'java.lang.String'
- com.ibatis.common.beans.ProbeException: There is no READABLE property named 'value' in class 'com.ving.xzfw.vo.PaymentInfo'
- resultMap使用不当导致出现There is no WRITEABLE property named 'student_id' in class 'com.ssi.model.Stud
- Mybatis找不到参数错误:There is no getter for property named 'categoryId' in 'class java.lang.Integer'。