之前配置
@Id
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "DOH_ID", unique = true, nullable = false, updatable = false)
@JsonBackReference
public DoDeliveryOrderHeader getDoDeliveryOrderHeader() {
return this.doDeliveryOrderHeader;
}
public void setDoDeliveryOrderHeader(DoDeliveryOrderHeader doDeliveryOrderHeader) {
this.doDeliveryOrderHeader = doDeliveryOrderHeader;
}
修改后配置 加粗部分是新加的
@Id
@Column(name = "DOH_ID")
public Integer getDohId() {
return this.doDeliveryOrderHeader.getDohId();
}
public void setDohId(Integer dohId) {
this.dohId = dohId;
}
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "DOH_ID", unique = true, nullable = false, updatable = false)
@JsonBackReference
public DoDeliveryOrderHeader getDoDeliveryOrderHeader() {
return this.doDeliveryOrderHeader;
}
public void setDoDeliveryOrderHeader(DoDeliveryOrderHeader doDeliveryOrderHeader) {
this.doDeliveryOrderHeader = doDeliveryOrderHeader;
}