动态查询嘛?很简单
ssh整合中hql多条件查询语句,参考如下:
String hql=" from Entity e where e.id=? and e.name=? and e.scope=?";
Object[] params=new Object[]{id,name,scope};
List list=getHibernateTemplate().find(hql,params);
from table where xxx=xxx and xxx like "%value%" and xxx=xxx
就这样、想怎么写就怎么写。条件用and连接。
用“and”连接的貌似是模糊查询吧,你能把问题说明白点吗?