I have below code in my DAO and it is returning a [Ljava.lang.String; cannot be cast to java.lang.String exception I would like to know why this cause and a solution.
public Collection<Testdoc> findTestId(int idTest, String... testtype) {
StringBuffer buf = new StringBuffer("SELECT w FROM Testdoc w WHERE w.Test.idTest = :idTest");
buf.append("AND w.testtype IN ( :testtype ) ");
return findByQuery(buf.toString(), "idTest", idTest, "testtype ", testtype );
}