title: How to find using JPQL if member value is in a collection of values
body: <p>I have an object in which a member is an enum, and I want to write a query returning all elements for which that member is in a list of values. So, I've written the following JQP query</p>
  
  <pre><code>@NamedQuery(name = MyBean.FIND_BY_STATUSES, query = "select t from "+MyBean.TABLE+" t where t.status member of :statuses"),
  class MyBean {
       @Enumerated(EnumType.STRING)
       private MyEnum status;
  }
  </code></pre>
  
  <p>That I try to get using the following EJB code</p>
  
  <pre><code>    Query findByStatuses = getEntityManager().createNamedQuery(MyBean.FIND_BY_STATUSES);
      findByStatuses.setParameter("statuses", Arrays.asList(statuses));
      return findByStatuses.getResultList();
  </code></pre>
  
  <p>Unfortunatly, Glassfish endlessly tells me I'm wrong (which I am, obviously).
  But what do I have to fix ? and how ?</p>