Select In Clause JPA - EclipseLink use Collection as parameter
<p>I use eclipselink 2.5.2 and I'm trying to execute a query: </p>

<pre><code>select bm.id from Bombom bm join Rosquinha r          
            where bm.nb = :numeroBombom and
            r.tipoRosquinha in :tiposRosquinha and
            r.status = :statusRosquinha and
            bm.situacao.id in :situacoesBombom

Passing parameter as a list, like:

QueryParameter param = new QueryParameter("situacoesBombom", Arrays.asList(1, 2, 3, 4));

query.setParameter(param.getKey(), param.getValue());
</code></pre>

<p>But besides this query execute without errors, the filter is not doing correctly. It executes just as if there weren't the IN clause, returns me a lot of Bombom Ids.</p>

<p>I see my coworkers doing this type of queries like:                 "bm.situacao.id in (:situacaoBombom1, :situacaoBombom2, :situacaoBombom3)" and pass each parameter for IN individually, but I think it should be a way to do what I need?</p>