query did not return a unique result: 2错误的发生
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2
因为查询结果是多条数据,接收查询结果的却是个对象。

query did not return a unique result: 2错误的发生的更多相关文章
- 解决java.sql.SQLException: ORA-01789: query block has incorrect number of result columns
java.sql.SQLException: ORA-01789: query block has incorrect number of result columns at oracle.jdbc. ...
- ORA-01789: query block has incorrect number of result columns
问题描述 ORA-01789: query block has incorrect number of result columns 原因如下 查询使用了union或者union all的时候查询上下 ...
- JS函数 返回值的函数 return sum;或者result = add2(3,4);
返回值的函数 思考:上一节函数中,通过"document.write"把结果输出来,如果想对函数的结果进行处理怎么办呢? 我们只要把"document.write(sum ...
- git clone的时候报error: RPC failed; result=18错误
因业务需求,需要把内网gitlab仓库的地址对外网访问,在gitlab前端配置了一个nginx代理服务器,来实现需求,可以在git clone的时候报error: RPC failed错误 [root ...
- s2h-HTTP Status 404 - No result defined for action and result input错误解决
今天做个小项目,用的是ssh,结果在运行的时候出现HTTP Status 404 - No result defined for action and result input的错误. 首先认真检查所 ...
- .net连接DB2的异常SQL0666 - SQL query exceeds specified time limit or storage limit.错误处理
SQL0666 - SQL query exceeds specified time limit or storage limit. 原因:查询超时 解决办法: set the DbCommand.C ...
- HTTP Status 404 - No result defined for action com.ouyang.action.GreetingAction and result success 错误解决办法
1.原来设置的包声明: <package name="myPackage" extends="struts-default"> <!-- 定义 ...
- Connector/c++ 查询Mysql,出现 can't fetch because not on result set 错误
使用 Connector/C++ 查询 Mysql 时,出现错误,提示如下: can't fetch because not on result set, 出现原因可以看这里:http://stack ...
- new types may not be defined in a return type(c++语言编译错误,处理)
在写程序的时候,定义类时要在大括号后面加上: class Point{ public: Point(int a,int b); Point(const Point &p); int getx( ...
随机推荐
- D# 语法
这篇文章 随意 的 记录 关于 D# 语法的想法 . template 和 interface 同时作为一等公民 D# 是程序员的语言,不需要太多包装和修饰, D# 是 简单的, 编译器 和 ID ...
- guava学习,集合专题
lists //JDKList<String> list = new ArrayList<String>();list.add("a");list.add( ...
- a标签通过浏览器下载远程图片
<a href="http://fooku.oss-cn-hongkong.aliyuncs.com/image/store/2nblHVyB6cWyBI7Aq2SEp6aZRBlui ...
- 19.1 PORT CONTROL DESCRIPTIONS
[原文] PORT CONFIGURATION REGISTER (GPACON-GPJCON) In S3C2440A, most of the pins are multiplexed pins. ...
- [JAVA]JAVA实现多线程的三种方式
1.继承Thread类,通过start()方法调用 public class MultiThreadByExtends extends Thread { @Override public void r ...
- C语言volatile关键字-漫画(转)
转载地址:https://zhuanlan.zhihu.com/p/56191979 ————— 第二天 ————— ———————————— Java内存模型简称JMM(Java Memory Mo ...
- Python 之 __new__() 方法与实例化
原文链接:https://www.cnblogs.com/ifantastic/p/3175735.html __new__() 是在新式类中新出现的方法,它作用在构造方法建造实例之前,可以这么理解, ...
- 数据帧、MTU、MSS、IP分片
1.以太网帧 在以太网链路上的数据包称作以太帧,在802.3标准里,规定了一个以太帧的数据部分(Payload)的最大长度是1500个字节(MTU),再加上14字节链路头和4字节的FCS,所以以太网帧 ...
- memcached—Java操作Memcached实例
前面博客介绍了如何在Windows操作系统中安装Memcached,总结一下如何使用Java操作Memcached实例: 代码一: package com.ghj.packageoftool; imp ...
- python之数据类型详解
python之数据类型详解 二.列表list (可以存储多个值)(列表内数字不需要加引号) sort s1=[','!'] # s1.sort() # print(s1) -->['!', ' ...