Resolved [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.
今天在做项目时候,在对无限级树的时候,发生了以下错误
Resolved [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than one was expected
错误原因是
Mybatis结果集映射的时候,在嵌套查询里面conllection 把ofType 和 javaType 意思弄反了。
正确的应该是 ofType=“此处填写实体类类型”
javaType = ”此处添加实体类需要映射的字段,如果字段的类型是集合,填写arraylist“