0
@Column(name = "plan_id")
private Long planId;

@ToString.Exclude
@OneToMany
@JoinColumns({
        @JoinColumn(name = "group_id", referencedColumnName = "id", insertable = false, updatable = false),
        @JoinColumn(name = "plan_id", referencedColumnName = "plan_id", insertable = false, updatable = false)
})
@Where(clause = "status = " + Constants.STATUS_ACTIVE)
@OrderBy("position asc")
private List<Member> members;

目前,当我打电话给成员时,我得到了 plan_id 存在的值。我有 plan_id 在数据库中为空的用例。

需要获取所有记录group_id = 123 and plan_id = null and status = Constants.STATUS_ACTIVE

我可以通过对上述查询的任何更改来获取这些值吗?

4

0 回答 0