我正在与 Jhipster 合作。我无法懒惰地吸引客户。
我做了一个这样的JDL......
PROPERTY
id
...
CUSTOMER
id
...
CUSTOMER_PROPERTY
id
customer_id
property_id
value
relationship OneToMany {
Customer to CustomerProperty
}
relationship ManyToOne {
CustomerProperty to Property
}
我的域名
Customer.java
@OneToMany(mappedBy = "customer", fetch = FetchType.LAZY)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<CustomerProperty> customerProperties = new HashSet<>();
Property.java 没有映射
CustomerProperty.java
@ManyToOne
private Property property;
@ManyToOne
@JsonIgnoreProperties("customerProperties")
private Customer customer;
我已经尝试显式设置 fetch = FetchType.LAZY 但它不断将完整的 Customer 对象与所有 CustomerProperties List
我想了解为什么 fetch 不起作用
莫回无
相关分类