欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__

程序员文章站 2022-03-01 13:36:50
...

异常信息:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '__frch_id_0'. It was either not specified and/or could not be found for the javaType (com.cy.pj.sys.entity.SysMenu) : jdbcType (null) combination.
### The error may exist in file [D:\Users\DREGON\MyProject\DB-SYS-V3.01\target\classes\mappers\SysMenuRoleMapper.xml]
### The error may involve com.cy.pj.sys.dao.SysMenuRoleDao.deleteObjectsByMenuId
### The error occurred while executing an update
### Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '__frch_id_0'. It was either not specified and/or could not be found for the javaType (com.cy.pj.sys.entity.SysMenu) : jdbcType (null) combination.

产生问题的原因:

<delete id="deleteObjectsById" parameterType="com.cy.pj.sys.entity.SysMenu">
        delete from sys_menus
        where id in
        <foreach collection="menus"
                 item="menu"
                 open="("
                 close=")"
                 separator=",">
            #{menu}  /*这里的item是对象不是属性 应该为 #{menu.id} */
        </foreach>
    </delete>
相关标签: MyBatis