如何使用hql从实体的基本类型集合中进行过滤

时间:2019-02-03 12:32:46

标签: java hibernate

我在这个实体中有一个set<>,如何用lc过滤lhhql

//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<>();

//.........
}

0 个答案:

没有答案