当前位置:网站首页>The new MySQL table has a self increasing ID of 20 bits. The reason is
The new MySQL table has a self increasing ID of 20 bits. The reason is
2022-04-23 16:48:00 【A coir boat in the broken white clouds】
since mybaitis-plus Appearance , We are used to automatically generating code , Although it saves a lot of development time , But it's also easy to ignore some details .
In a business operation , I need to add a table a And table b The data of , surface a Add normal , surface b It opened my eyes

I don't understand , So I went online to find a solution .
Scheme 1 :
TRUNCATE TABLE tablename
Da baa !
Option two :

Da baa !
So I tried to add a piece of data to the database :

This shows that it is not a database problem , That's my code !
By a colleague , Then enter the entity class to view :

No problem , Then go to code logic , Found my watch a The entity class of does not add
type = IdType.Auto
Selfishness is not the problem , Because my watch a The addition of data is very normal , What's not normal is the watch b, But I still treat a dead horse as a living horse doctor , Restart the project with a try mentality , add to , success 了 !

Milk thought ~
ps: If... Is not specified when defining the entity class @TableId(type=IdType.AUTO), that mybatisPlus Will id The type of is set to IdType.NONE, Use the snowflake algorithm to automatically help you set id Well ~
A thousand Li dike , Collapse in ant nest , I hope everyone will not be defeated by small details
版权声明
本文为[A coir boat in the broken white clouds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231400068490.html
边栏推荐
- There is a problem with the light switch from 1 to 100
- 蓝桥杯省一之路06——第十二届省赛真题第二场
- New project of OMNeT learning
- JIRA screenshot
- Gartner announces emerging technology research: insight into the meta universe
- Kunteng full duplex digital wireless transceiver chip kt1605 / kt1606 / kt1607 / kt1608 is suitable for interphone scheme
- 织梦DEDECMS安全设置指南
- Nacos detailed explanation, something
- Dancenn: overview of byte self-developed 100 billion scale file metadata storage system
- 关于 background-image 渐变gradient()那些事!
猜你喜欢

面试百分百问到的进程,你究竟了解多少

Mock test

Query the data from 2013 to 2021, and only query the data from 2020. The solution to this problem is carried out

Detailed explanation of information abstract, digital signature, digital certificate, symmetric encryption and asymmetric encryption

博士申请 | 厦门大学信息学院郭诗辉老师团队招收全奖博士/博后/实习生
![[pyGame games] how did angry birds, a mobile game that became popular all over the world 10 years ago, dominate the list? Classic return](/img/f5/15b3731e75eb4d861bd9d29ae244da.png)
[pyGame games] how did angry birds, a mobile game that became popular all over the world 10 years ago, dominate the list? Classic return

NVIDIA显卡驱动报错

Sail soft segmentation solution: take only one character (required field) of a string

DDT + Excel for interface test

ByteVCharts可视化图表库,你想要的我都有
随机推荐
ACL 2022 | dialogved: a pre trained implicit variable encoding decoding model for dialogue reply generation
关于局域网如何组建介绍
Sail soft segmentation solution: take only one character (required field) of a string
Knowledge points and examples of [seven input / output systems]
SQL database
Selenium IDE and XPath installation of chrome plug-in
Differences between MySQL BTREE index and hash index
5-minute NLP: text to text transfer transformer (T5) unified text to text task model
Custom implementation of Baidu image recognition (instead of aipocr)
Real time operation of vim editor
loggie 源码分析 source file 模块主干分析
File system read and write performance test practice
Redis "8" implements distributed current limiting and delay queues
建站常用软件PhpStudy V8.1图文安装教程(Windows版)超详细
MySQL master-slave replication
Nacos detailed explanation, something
An essay on the classical "tear down the wall in thinking"
◰GL-阴影贴图核心步骤
vscode如何比较两个文件的异同
【PIMF】OpenHarmony啃论文俱乐部—在ACM Survey闲逛是什么体验