mybatics異常org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 5


遍歷結果集1-n的時候出現

org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 5

這個異常;

我的問題是在數據庫之中,主鍵表和外鍵表的的列名相同,不能夠同時遍歷,得到的結果不能夠存放人自己設置的

mapresult之中會出現得到多個結果的mapresult

只需要把兩個表的列名修改一下,讓它們不相同就可以了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM