问答详情
源自:3-11 用户模型管理--用户注册功能实现02

必须要设置ID是怎么回事

### Error updating database.  Cause: java.sql.SQLException: Field 'id' doesn't have a default value
### The error may involve com.miaoshaproject.dao.UserPasswordDOMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into user_password      ( encrpt_password,                       user_id )       values ( ?,                       ? )
### Cause: java.sql.SQLException: Field 'id' doesn't have a default value
; ]; Field 'id' doesn't have a default value; nested exception is java.sql.SQLException: Field 'id' doesn't have a default value]

提问者:一千年以后14 2019-01-11 14:18

个回答

  • 一千年以后14
    2019-01-11 14:26:14

    解决了,原来user_password表的ID忘记设置自增长了,尴尬