JPA, 최대 절전 모드,JPA, 최대 절전 모드, OneToMany 맵핑
부모 감안할 때 OneToMany 매핑 문제 :
@Entity
public class Discount {
@Id
private String id;
@Column(nullable = false)
private String userName;
@Column(nullable = false)
private String iDocId;
@Column(nullable = false)
private Date creationTime;
@Column(nullable = false)
private String salesOrganization;
.........
@OneToMany(cascade = CascadeType.ALL, mappedBy = "discount")
private Set<DiscountConditionScale> conditionScales = new HashSet<DiscountConditionScale>();
.........
}
와 아이 :
@Entity
public class DiscountConditionScale {
@Id
@ManyToOne
private Discount discount;
private BigDecimal quantity;
private BigDecimal rate;
.......
을}
ike는 DiscountConditionScale의 키를 (할인, 비율, 수량)으로합니다. 어떻게해야합니까?
많은 감사합니다.
대단히 감사합니다. 그것은 트릭이었다! – Marcin