Set array of parameters to hibernate query language

hibernate, hql

Solution

try this one

 query.setParameterList("reportID", new Object[]{"aaa","bbb"});

Problem

Currently the query takes in a single reportID to return the results. Now if I want to pass multiple reportIDs and return the o/p in just 1 call to the DB, how do I do that? ``` String queryText = "from com.abc.domain.bcd.Report report where report.reportID in :reportId"; Query query = SessionFactory.getCurrentSession().createQuery(queryText.toString()); query.setParameter("reportID", reportId); query.list(); ``` I tried passing as an arrayList but no luck. Got the error below ``` List<String> reportID= new ArrayList<String>(); reportID.add("aaa"); reportID.add("bbb"); ``` java.util.ArrayList incompatible with java.lang.String

Original source