在学习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文件这样设置的:
解决方法:只要在实体类中
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)