PersistentObjectException: detached entity passed to persist thrown by JPA and Hibernate

前端 未结 18 2682
醉酒成梦
醉酒成梦 2020-11-22 05:10

I have a JPA-persisted object model that contains a many-to-one relationship: an Account has many Transactions. A Transaction has one

18条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 05:49

    If above solutions not work just one time comment the getter and setter methods of entity class and do not set the value of id.(Primary key) Then this will work.

提交回复
热议问题