Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'emp' of 'class domain.Dept' with value '[]' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'emp' in 'class domain.Dept'
### The error may exist in mapper/DeptMapper.xml
### The error may involve dao.DeptDao.selectAllEmp
### The error occurred while handling results
### SQL: select empno,ename,sal from emp where empno = ?
### Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'emp' of 'class domain.Dept' with value '[]' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'emp' in 'class domain.Dept'
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
解决问题
对于一对多这种查询
一定要注意属性名别写错