title: Spring jpaTemplate syntax to select from list
body: <p>I feel like a noob trying to figure this one out - </p>
  
  <p>I want to know  the right syntax for the below jpa query to select from a list of numbers. ? </p>
  
  <pre><code>List&lt;Long&gt; personIds = new ArrayList&lt;Long&gt;();
  personIds.add(1L);
  personIds.add(2L);
  jpaTemplate.find("select count(*) from Person p where p.id in (?) ",personIds);
  </code></pre>
  
  <p>When I try , I get </p>
  
  <pre><code> "java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Long"
  </code></pre>