課程
/后端開發(fā)
/Java
/SpringBoot構(gòu)建電商基礎(chǔ)秒殺項(xiàng)目
兩個(gè)表的自增都設(shè)置了,為什么拿不到user_id,求各位大神解惑!
2019-01-30
源自:SpringBoot構(gòu)建電商基礎(chǔ)秒殺項(xiàng)目 3-11
正在回答
首先user_id這個(gè)字段你需要先在數(shù)據(jù)庫(kù)中給上一個(gè)默認(rèn)值,讓后,如圖,你將userDo的id給UserPasswordDo的id進(jìn)行一次賦值,即可
qq_罪名_1
謝謝,確實(shí)是寫丟了,沒有set進(jìn)它的id
舉報(bào)
應(yīng)用SpringBoot快速搭建擁有用戶、商品、交易及秒殺活動(dòng)的電商秒殺應(yīng)用。
1 回答 Field 'id' doesn't have a default value]
1 回答ause: 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 ( enc
1 回答數(shù)據(jù)庫(kù)里user_id=0的問題
3 回答user_id拿不到值是為什么呀
3 回答insert 數(shù)據(jù)后,“user_password”表的user_id為0
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2019-01-31
首先user_id這個(gè)字段你需要先在數(shù)據(jù)庫(kù)中給上一個(gè)默認(rèn)值,讓后,如圖,你將userDo的id給UserPasswordDo的id進(jìn)行一次賦值,即可
2019-02-02
謝謝,確實(shí)是寫丟了,沒有set進(jìn)它的id