Using EclipseLink, you need to use a name for your parameterization.
Example:.
TypedQuery<Person> q = em.createQuery("select p from Person p where p.name in :names", Person.class); List<String> names = Arrays.asList(new String[] { "Bill Gates", "Steve Jobs" }); q.setParameter("names", names);
The symbol "?" does not work using the "in" clause. It has been tested in EclipseLink 2.5.1.
FΓ‘bio almeida
source share