当前位置:网站首页>Field * doesn't have a default value problem

Field * doesn't have a default value problem

2022-06-13 03:41:00 Hacah

Preface

Recently developed , Insert data into the table , There is Field * doesn’t have a default value Report errors , The primary key uses String type .

One 、 scene

The watch uses String Type as primary key , Use MybatisPlus When inserting data , The primary key brings data into the database . And then came
 Insert picture description here
as a result of : The primary key has no default value , The value passed in was not inserted into the database .
Primary key cannot be empty ,String Type cannot auto increment primary key .
If you use a framework , The strategy needs to be well chosen , Change the strategy to input that will do .

原网站

版权声明
本文为[Hacah]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280527302392.html