我在这个实体中有一个set<>
,如何用lc
过滤lh
或hql
?
//I use this hql ,but it do not work ,
String hql = "from VisitPlan v left join fetch v.lc where v.lc in :lcs"
@Entity
@Table(name = "T_VisitPlan")
public class VisitPlan {
//............
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable
@Column
private Set<String> lh = new HashSet<>();
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable
@Column
private Set<String> lc = new HashSet<>();
//.........
}