If I have the following class and I want to delete a car. Can I specify in hibernate that it first need
to remove all the rims and than remove all the weels? How does hibernate decide the order?
public class Car{
@Column(name = "name", nullable = false)
private String name;
@OneToMany(mappedBy = "Car", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Wheel> wheels= new ArrayList<>();
@OneToMany(mappedBy = "Car", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Rim> rims= new ArrayList<>();
....
}