Unknown column ‘xxx’ in ‘field list’
在开发中出现了此类报错
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column 'creat_time' in 'field list'
### The error may exist in xxx.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT xxx FROM xxx ORDER BY xxx DESC LIMIT ?
### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'xxx' in 'field list'
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'xxx' in 'field list'] with root cause
- 经过我的检查发现是一个类中的属性的名字写少了一个字母
//创建时间
@TableField(fill = FieldFill.INSERT)
private LocalDateTime creatTime;
- 修改后
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;