我收到“列 invoicelin_.invoicedraft 不存在”错误。当我尝试在没有 InvoiceLine 的情况下保存 InvoiceDraft 对象时,它运行良好。我认为我的注释有问题。
我的 InvoiceDraft 实体;
//some other columns
@Id
@Basic(optional = false)
@Column(name = "uuid")
private String uuid;
@OneToMany(cascade = CascadeType.ALL,mappedBy = "invoiceDraft", fetch = FetchType.LAZY)
private List<InvoiceLine> invoiceLineList;
发票行实体;
//some other columns
@JoinColumn(name = "invoice_draft", referencedColumnName = "uuid")
private InvoiceDraft invoiceDraft;