JPA delete parent through child in in ManyToOne relationship using CascadeType.all
I want to delete the parent if the child gets deleted while the parent doesn’t have any other children.
If i use CascadeType.ALL i get a foreign key error when attempting to delete a child while more than one child exists.