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