org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'name' in 'field list'
### The error may involve com.itheima.dao.UserDao.updateUser-Inline
### The error occurred while setting parameters
### SQL: update user set name=?,address=?,sex=?,birthday=? where id=?;
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'name' in 'field list'


mybatis报错: Unknown column ‘name‘ in ‘field list‘

出现这个的原因:注释“字段列表”中的未知列“name“

然后我去翻了我的dao.xml,

发现是我的数据库的名称和我在java定义的名称没有对应,改了就行了,所以各位在命名的时候,尽量要一致哦。

这样⬇


mybatis报错: Unknown column ‘name‘ in ‘field list‘

改成这样 


mybatis报错: Unknown column ‘name‘ in ‘field list‘

相关文章:

  • 2022-12-23
  • 2021-06-09
  • 2021-06-04
  • 2021-11-02
  • 2021-08-22
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2022-01-22
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案