@ManyToOne联级保存

@ManyToOne 联级保存
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "feetid")
private Vesselagg vesselagg;




@OneToMany联级保存
@OneToMany(mappedBy = "vesselagg", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private Set<VesselModel> vesselModels;

你可能感兴趣的:(man)