cannot simultaneously fetch multiple bags[]不能抓取一对多的属性

来源:互联网 发布:中国网络资讯台无锡市 编辑:程序博客网 时间:2024/05/20 08:24

cannot simultaneously fetch multiple bags: [com.shiyu.model.business.PackOrder.packOrderBalanceList]

抓取关联表属性失败异常.

@JSONField
@JsonIgnore
@OneToMany(mappedBy = "packOrder")
@org.hibernate.annotations.ForeignKey(name = "none")
private Set<PackOrderBalance> packOrderBalanceList = new ArrayList<>();


处理方法: 把LIst改为Set即可

private Set<PackOrderBalance> packOrderBalanceList = new HashSet<>();



阅读全文
0 0