无法更新阅读状态
登陆后点击“想看” 或者 “看过” 显示以下错误。
我沿着entity, mapper, service, controller一路检查,也没发现book_id字段漏了或者命名错误的问题。不太确定这个问题出在哪,老师有什么建议吗?
相关代码:
### Error updating database. Cause: java.sql.SQLException: Field 'book_id' doesn't have a default value
### The error may exist in com/imooc/reader/mapper/MemberReadStateMapper.java (best guess)
### The error may involve com.imooc.reader.mapper.MemberReadStateMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO member_read_state ( create_time ) VALUES ( ? )
### Cause: java.sql.SQLException: Field 'book_id' doesn't have a default value
; Field 'book_id' doesn't have a default value; nested exception is java.sql.SQLException: Field 'book_id' doesn't have a default value
12
收起
正在回答 回答被采纳积分+1
1回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星