i have the following two entities:
1- PlayList:
@OneToMany(fetch = FetchType.EAGER, mappedBy = \"playlist\", orphanRemoval = true, c
I was having same issue. I was trying to delete and insert in the same transaction. I added theEntityManager.flush(); after theEntityManager.remove(entity);.
theEntityManager.flush();
theEntityManager.remove(entity);