当前位置:网站首页>Primary key policy problem
Primary key policy problem
2022-07-02 10:58:00 【Java can fly】
In the use of MP When doing database operations , The following error occurred ,
com.alibaba.excel.exception.ExcelAnalysisException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class com.ym.edu.entity.Subject' with value '1540878683122229249' Cause: java.lang.IllegalArgumentException: argument type mismatch
After inspection , It is found that it is a primary key policy problem ,ID_WORKER The primary key policy obtains long type , The database is of string type
@ApiModelProperty(value = " Course category ID")
@TableId(value = "id", type = IdType.ID_WORKER)
private String id;
Therefore, the primary key policy should be changed to ID_WORKER_STR.
边栏推荐
- C#中索引器
- Disassembling Meitu SaaS: driving the plane to change the engine
- 【快应用】Win7系统使用华为IDE无法运行和调试项目
- 二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
- MySQL lethal serial question 4 -- are you familiar with MySQL logs?
- 力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)
- MYSQL环境配置
- 首份中国企业敏捷实践白皮书发布| 附完整下载
- axis设备的rtsp setup头中的url不能带参
- 简洁、快速、节约内存的Excel处理工具EasyExcel
猜你喜欢
"Matching" is true love, a new attitude for young people to make friends
[SUCTF2018]followme
【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决
JSP webshell免杀——webshell免杀
4. Random variables
618 what is the secret of dominating the list again? Nike's latest financial report gives the answer
Nodejs+express+mysql simple blog building
VSCode工具使用
2022-06-17
Open the encrypted SQLite method with sqlcipher
随机推荐
(五)APA场景搭建之挡位控制设置
MySQL keyword
快应用中实现自定义抽屉组件
Disassembling Meitu SaaS: driving the plane to change the engine
AI技术产业热点分析
洛谷 P1892 [BOI2003]团伙(并查集变种 反集)
js promise. all
Ks009 implement pet management system based on SSH
PCL eigen introduction and simple use
华为游戏初始化init失败,返回错误码907135000
对话吴纲:我为什么笃信“大国品牌”的崛起?
In the face of uncertainty, the role of supply chain
二叉树专题--P1030 [NOIP2001 普及组] 求先序排列
Operator-1 first acquaintance with operator
Sus system availability scale
K-d tree and octree of PCL
nodejs+express+mysql简单博客搭建
"Talking about podcasts" vol.352 the age of children: breaking the inner scroll, what can we do before high school?
学习open62541 --- [66] UA_String的生成方法
2022-06-17