0
String hql = "select * from myTable where isActive IN (:isActive)";
Query query = session.createQuery(hql);
query.setString("school","");
query.setString("isActive", "Y");//working
query.setString("isActive", "N");//working
query.setString("isActive", "Y","N"); // not working
query.setString("isActive", "'Y','N'"); // not working
return query.list();
我不知道如果下面的代碼應該工作,我想知道如果我可以傳遞值列表到我的搜索字符串參數,所以我不需要創建查詢;一個用於選擇所有數據而不管狀態,另一個用於僅選擇活動數據。查詢參數值的通過列表