项目中利用SpringDataJPA技术进行新增实体时,产生Multiple representations of the same entity异常。
这个异常原因有很多,但在我这里就是就是当我循环save实体时,实体没有指定主键策略,两个实体的id相同了,就报这个错误了。
记录一下。。。
项目中利用SpringDataJPA技术进行新增实体时,产生Multiple representations of the same entity异常。
这个异常原因有很多,但在我这里就是就是当我循环save实体时,实体没有指定主键策略,两个实体的id相同了,就报这个错误了。
记录一下。。。