title: How to use the IN clause in an JPA @Query annotation
body: <p>I have defined this method</p>
  
  <pre><code> @Query("select cs from CenterStudy cs where cs.id in (?1)")
   @EntityGraph(value = "centerStudyAndNotifiedUsers", type = EntityGraph.EntityGraphType.LOAD)
   List&lt;CenterStudy&gt; findAllByIdsWithCenterAndUsers(List&lt;Long&gt; ids);
  </code></pre>
  
  <p>The list with the ids is not null, nor empty, but I always get the following exception: </p>
  
  <pre><code>java.lang.NullPointerException
      at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
      at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:613)
      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1900)
  </code></pre>
  
  <p>I'm pretty sure it has something to do with the way the IN clause it's defined. </p>
  
  <p>Any suggestions are well welcomed!  </p>