Mybatis中关于:Statement returned more than one row, where no more than one was expected.
来源:互联网 发布:epub手机阅读软件 编辑:程序博客网 时间:2024/05/19 02:20
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than one was expected.
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75) ~[MyBatisExceptionTranslator.class:1.2.2]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371) ~[SqlSessionTemplate$SqlSessionInterceptor.class:1.2.2]
Caused by: org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than one was expected. at org.apache.ibatis.executor.ResultExtractor.extractObjectFromList(ResultExtractor.java:58) ~[ResultExtractor.class:3.2.8] at org.apache.ibatis.executor.loader.ResultLoader.loadResult(ResultLoader.java:71) ~[ResultLoader.class:3.2.8]
由于查找出了多个对象,一般查找的那个字段是数据有重复。
程序期望返回不超过一行数据,但实际返回了多于一行的数据。
比如sql语句的返回类型是非集合类型,但返回了多行数据。Statement returned more than one row, where no more than one was expected.
之前调接口没有这样的问题,后来有人在数据库的表中加了新数据,才导致出现该问题,优化后解决。
1 1
- Mybatis中关于:Statement returned more than one row, where no more than one was expected.
- mybatis中:returned more than one row, where no more than one was expected
- mybatis ---- 级联查询 一对多 (集合映射)mybatis中:returned more than one row, where no more than one was expected
- more than one row with the given identifier was found
- Result consisted of more than one row
- Result consisted of more than one row
- ORA-01427:single-row subquery returns more than one row
- HibernateException:More than one row with the given identifier was found: 1, for class....
- Hibernate:More than one row with the given identifier was found解决办法
- Hibernate 级联查询: More than one row with the given identifier was found 报错
- More than one row with the given identifier was found 问题
- org.hibernate.HibernateException: More than one row with the given identifier was found: 116, for cl
- django入门:get() returned more than one topic
- More than one order matters
- Result consisted of more than one row 错误的解决
- Result consisted of more than one row错误的修正
- Mysql报错:Result consisted of more than one row
- ERROR 1172 (42000): Result consisted of more than one row
- 进程间通信——管道通信
- 自己留存的一些东东
- hdu1312
- IDC机房ESXi5.0误删除虚拟机的数据恢复过程
- Android系统修改汇总(MTK)
- Mybatis中关于:Statement returned more than one row, where no more than one was expected.
- 我的第一个功能页面(下)
- 关于Android6.0以上动态获取运行时权限、及无法正常运行百度地图API的问题
- sql查询一对多时,多的只取某一个字段组装成json
- Android开发之Activity跳转动画以及finish动画
- 实现网页图片的异步加载
- JSP数据交互
- 基于小波的图像融合
- 开发者常犯的十大加密错误