deleted object would be re-saved by cascade (remove deleted object from associations)

后端 未结 18 1197
轮回少年
轮回少年 2020-11-30 00:19

i have the following two entities:

1- PlayList:

@OneToMany(fetch = FetchType.EAGER, mappedBy = \"playlist\", orphanRemoval = true, c         


        
18条回答
  •  感情败类
    2020-11-30 01:00

    This post contains a brilliant trick to detect where the cascade problem is:
    Try to replace on Cascade at the time with Cascade.None() until you do not get the error and then you have detected the cascade causing the problem.

    Then solve the problem either by changing the original cascade to something else or using Tom Anderson answer.

提交回复
热议问题