LIYUANWAI
2018-09-15 11:09:44
查询时报错 Expected one result (or null) to be returned by selectOne(), but found: 4
Expected one result (or null) to be returned by selectOne(), but found: 4
翻译为;期望selectOne()返回一个结果(或null),但找到:4
然后我就看了下dao层的接口 是Office getOffice(id); 查的是一条数据,可结果返回的是4条数据的结果集。
当然报错咯!
解决方法是将接口改为list
List<Office>getOffice(String id);
评论
最近浏览
bibibibi
2023年4月6日
暂无贡献等级
shuffle LV2
2022年8月5日
aaa9898
2022年5月12日
暂无贡献等级
zhouyl
2022年3月10日
暂无贡献等级
13647097645 LV6
2021年9月2日
13561143836 LV7
2021年6月25日
jpfnihao LV3
2021年6月1日
33303089
2021年3月29日
暂无贡献等级
LebronKingsJames LV2
2021年3月20日
阿甘木子
2021年3月6日
暂无贡献等级


