`
hoho922
  • 浏览: 32273 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

There is no READABLE property named 'userName' in class 'java.lang.String'

阅读更多
iBatis做模糊查询时,报如下错误,不知道各位有没遇到过?如何处理?

错误:
com.ibatis.common.beans.ProbeException: There is no READABLE property named 'userName' in class 'java.lang.String'
at com.ibatis.common.beans.ClassInfo.getGetter(ClassInfo.java:259)
at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:304)
at com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:199)
at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:74)

SQL为:
  <!-- 用户名模糊查询 -->
    <select id="getUserByName" resultMap="UserResult" parameterClass="String" resultClass="List" cacheModel="user-cache">
           select A.userId,
           A.userName,
           A.companyId,
           A.userBH,
           A.userPassword,
           A.userFunction,
           B.companyName,
           A.createUser,
           A.createDate,
           A.updateUser,
           A.updateDate
    from userTable A left outer join company B on A.companyId=B.companyId
       <dynamic prepend="where">
            <isNotEmpty prepend="and" property="userName">
                userName like '%$userName$%'
            </isNotEmpty>
        </dynamic>
    </select>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics