在学习mybatis的resultmap映射的时候遇到了这个问题,
### The error may exist in mapper/EmpMapper.xml
### The error may involve comn.sun.dao.EmpDao.getEmpAndDept
### The error occurred while handling results
### SQL: select e.emp_id,e.name,e.sex,e.sal,e.address,d.dept_id,d.dept_name from emp e,dept d where e.dept_id=d.dept_id and e.emp_id=?
### Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'address' from result set. Cause: java.sql.SQLException: Bad format for BigDecimal 'songtian' in column 5.
xml文件这样设置的:
解决方法:只要在实体类中