异常:There was no TypeHandler found for parameter id of statement
来源:互联网 发布:java时间怎么加减 编辑:程序博客网 时间:2024/06/08 01:24
这是Mybatis报的错。
大致环境:数据库的字段是ConcreteId,但是实体继承了一个统一的适配器实体(BaseModelAdapter<PK extends Serializable>,里面包含了id,createDate等一些会经常用到的字段,适配器实体里主键(PK)定义的是一个泛型)。
在Mapper文件中需要根据主键做更新操作,如下写:
where storeSeq = #{id,jdbcType=BIGINT}就会抛出异常:There was no TypeHandler found for parameter id of statement
解决方法很简单,就是加一个javaType,如下:
where storeSeq = #{id,jdbcType=BIGINT,javaType=Long}
因为实体中的主键是泛型的类型,需要在Mapper文件中指明javaType
阅读全文
0 0
- 异常:There was no TypeHandler found for parameter id of statement
- 异常org.apache.ibatis.executor.ExecutorException: There was no TypeHandler found for parameter..
- No typehandler found for property creationDate
- no typehandler found for property XXXX 解决
- No typehandler found for property XXX
- mybatis TypeHandler java.sql.SQLException: No value specified for parameter
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- mybaits的There is no getter for property named 'id' in 'class java.lang.Integer异常
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement 'com.atguigu.atcrowdfunding.p
- 使用Mybatis时出错:A query was run and no Result Maps were found for the Mapped Statement
- Mybatis报错—— A query was run and no Result Maps were found for the Mapped Statement
- CXF异常 No DestinationFactory was found for the namespace http://schemas.xmlsoap.org
- No value was provided for the parameter ‘appIdName’ when provisioning
- Linux基本概念及操作(终端、shell、快捷键、通配符)
- 初学python:递归输出斐波那契数列
- c语言作业1028/1029
- ES6学习笔记(一)
- Makefile和Kconfig配置项目——Input子系统fingerprint
- 异常:There was no TypeHandler found for parameter id of statement
- 云计算的应用有哪些
- StackExchange.Redis官方文档(二)【配置】
- Java中二叉树面试题
- Android 开发中比较常见的5个内存泄漏问题及解决办法
- js中的原始值是什么?
- mysql中的本文存储(varchar char text blob)
- ORACLE 查询字表未明确定义列
- AlphaGo zero 概述和引言翻译