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

这是怎么回事

### Error updating database.  Cause: java.sql.SQLException: Field 'gender' doesn't have a default value

### The error may involve com.tt.dao.UserDOMapper.insertSelective-Inline

### The error occurred while setting parameters

### SQL: insert into user_info      ( name,                              age,                       telphone,                       register_mode )       values ( ?,                              ?,                       ?,                       ? )

### Cause: java.sql.SQLException: Field 'gender' doesn't have a default value

; ]; Field 'gender' doesn't have a default value; nested exception is java.sql.SQLException: Field 'gender' doesn't have a default value]


提问者:慕娘2158190 2019-03-08 21:00

个回答

  • ewang1986
    2019-03-09 21:22:47

    gender字段没有设置默认值,你又没给它传值 所以...