之前配置
??? @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
?? [email protected](name = "DOH_ID")
?? ?public Integer getDohId() {
?? ???? return this.doDeliveryOrderHeader.getDohId();
?? ?}
?? ?public void setDohId(Integer dohId) {
?? ???? this.dohId = dohId;
?? ?}
?? [email protected](fetch = FetchType.LAZY)
?? [email protected](name = "DOH_ID", unique = true, nullable = false, updatable = false)
?? [email protected]
?? ?public DoDeliveryOrderHeader getDoDeliveryOrderHeader() {
?? ???? return this.doDeliveryOrderHeader;
?? ?}
?? ?public void setDoDeliveryOrderHeader(DoDeliveryOrderHeader doDeliveryOrderHeader) {
?? ???? this.doDeliveryOrderHeader = doDeliveryOrderHeader;
?? ?}