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

后端 未结 18 1193
轮回少年
轮回少年 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 00:55

    Because i need FetchType to be EAGER, i remove all associations by setting them to (null) and save the object (that remove all association in the database) then delete it!

    That add some milliseconds but it's fine for me, if there better way to keep those MS add your comment bellow..

    Hope that help someone :)

提交回复
热议问题