遍歷結果集1-n的時候出現
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 5
這個異常;
我的問題是在數據庫之中,主鍵表和外鍵表的的列名相同,不能夠同時遍歷,得到的結果不能夠存放人自己設置的
mapresult之中會出現得到多個結果的mapresult
只需要把兩個表的列名修改一下,讓它們不相同就可以了