A different object with the same identifier value was already associated with the session的解决办法
批量保存实体方法报错是因为要保存的实体表内主键自增
需要在实体@Id注解下添加@GeneratedValue(strategy=GenerationType.IDENTITY)注解即可
学习时的痛苦是暂时的 未学到的痛苦是终生的
作者:卷心菜的奇妙历险
本文版权归作者和博客园共有,遵循 CC 4.0 BY-SA 版权协议,欢迎转载 转载请附上原文出处链接和本声明,否则保留追究法律责任的权利。