Delete Not Working with JpaRepository

前端 未结 12 2025
情书的邮戳
情书的邮戳 2020-12-07 11:55

I have a spring 4 app where I\'m trying to delete an instance of an entity from my database. I have the following entity:

@Entity
public class Token impleme         


        
12条回答
  •  自闭症患者
    2020-12-07 12:57

    I just went through this too. In my case, I had to make the child table have a nullable foreign key field and then remove the parent from the relationship by setting null, then calling save and delete and flush.

    I didn't see a delete in the log or any exception prior to doing this.

提交回复
热议问题