org.hibernate.PersistentObjectException: detached entity passed to persist

后端 未结 7 1406
生来不讨喜
生来不讨喜 2020-11-30 00:56

I had successfully written my first master child example with hibernate. After few days I took it again and upgraded some libraries. No sure what did I do but I could never

7条回答
  •  半阙折子戏
    2020-11-30 01:37

    I had the "same" problem because I was writting

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    

    I deleted that line due that I do not need it at the moment, I was testing with objects and so. I think it is in your case

    I do not have any controller and my API is not being accessed, it is only for testing (at the moment).

提交回复
热议问题