我正在使用 jhipster 标准和 jpa 规范来实现一个端点进行研究。
好吧,它正在工作,但请继续向我发送副本。
有这个模型的prestations
public class Prestation extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Column(name = "jhi_label", nullable = false)
private String label;
@Column(name = "description")
private String description;
@Column(name = "unit")
private String unit;
@NotNull
@Column(name = "activated", nullable = false)
private boolean activated;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("prestations")
private SubCategory subCategory;
@OneToMany(mappedBy = "prestation", cascade = CascadeType.ALL, orphanRemoval = true)
private List<CompanyPrestation> companies = new ArrayList<>();
以及公司与财产之间的关系
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL, orphanRemoval = true)
@LazyCollection(LazyCollectionOption.FALSE)
private List<CompanyPrestation> prestations = new ArrayList<>();
芜湖不芜
相关分类