Nesting multiple entities hibernate giving issues
问题 I am having an issue with mapping a 3rd level entity please consider the following code: Parent Entity : @Entity @Table(name = "Tree") public class Tree { @Id @Column(name="Tree_Id") @GeneratedValue(strategy = GenerationType.Identity) private Integer id; @OneToMany(mappedBy = "parentTree", cascade = CascadeType.ALL, orphanRemoval = true) private Set<Branch> branches; //Getters And Setters public Branch addBranch(Branch branch) { getBranch().add(branch); branch.setTree(this); return branch; }