问题:Hibernate or spring Data JPA 出现异常:
org.hibernate.HibernateException: More than one row with the given identifier was found:XXXXX
解决方法:
查看@ManyToOne 在one的一方是不是有多条数据先,
如果one的一方只有一条数据。那就看one的一方是否有外连接的表,
继续排查one一方的@OneToOne,@MantToOne这种表的数据是否不符合约定即可
像@OneToOne的话就只能一对一否则就会报上面这类错。