title: Custom query in Hibernate repo
body: <p>I am receiving the last price of a product by the following:</p>
  
  <pre><code>ProductPrice findFirstByProductIdOrderByDateFromDesc(@Param(value = "product") Long product);
  </code></pre>
  
  <p>However, now I am trying to pass a list of product ids as an argument. </p>
  
  <p>I have the following:</p>
  
  <pre><code>List&lt;ProductPrice&gt; findAllFirstByProductIdOrderByDateFromDesc(@Param(value = "product")List&lt;Long&gt; products);
  </code></pre>
  
  <p>Which at execution throws:</p>
  
  <pre><code>2016-10-06 14:41:17,130 WARN o.h.e.j.s.SqlExceptionHelper: SQL Error: 0, SQLState: 42883
  2016-10-06 14:41:17,130 ERROR o.h.e.j.s.SqlExceptionHelper: ERROR: operator does not exist: bigint = record
    Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
    Position: 7207
  2016-10-06 14:41:17,148 ERROR o.a.c.c.C.[.[.[.[dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
  org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = record
    Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
    Position: 7207
  </code></pre>
  
  <p>Any ideas what am I doing wrong?</p>