If the primary key is self increment, you have to add @GeneratedValue(generator = “JDBC”) on your entity’s field. Otherwise, the primary key can be got if you want to use it again.
@GeneratedValue(generator = “JDBC“)
最新推荐文章于 2025-09-29 15:07:18 发布
本文介绍了在实体类中如何正确配置自增主键。如果主键采用自增方式,则需在实体字段上添加@GeneratedValue注解,并指定generator为JDBC。此配置确保主键能被正确管理和使用。
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
图片生成
Stable-Diffusion
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
5699





