我正在与Jhipster合作.我无法懒洋洋地获取客户.
我已经像这样制作了一个JDL …
PROPERTY
id
...
CUSTOMER
id
...
CUSTOMER_PROPERTY
id
customer_id
property_id
value
relationship OneToMany {
Customer to CustomerProperty
}
relationship ManyToOne {
CustomerProperty to Property
}
我的网域
客户.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列表一起使用
我想了解为什么提取失败
最佳答案