hibernate逻辑或:
1.构建查询对象
DetachedCriteria cri = DetachedCriteria.forClass(类名.class);
2. 初始化对象:
Disjunction disjunction = Restrictions.disjunction();
3.添加(or)条件
disjunction.add(Restrictions.eq("字段名1", 字段值1));
disjunction.add(Restrictions.eq("字段名2", 字段值2));
disjunction.add(Restrictions.eq("字段名3", 字段值3));
4.将查询条件添加到查询对象
cri.add(disjunction);