我有 2 个名为 PurchaseList.java 和 PurchaseListItems.java 的类
我必须在 PurchaseListItems 中映射 PurchaseList
采购清单.java
@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="pl_id",referencedColumnName="id")
private List<PurchaseListItems> purchaseListItems;
PurchaseListItems.java
@ManyToOne
@JoinColumn(name="pl_id")
private PurchaseList purchaseListId;
一切都很好,但我在 pl_id 中得到了空值。请告诉我哪里错了