title: How to use LIKE ANY in JPQL with array
body: <p>I am working with jpql native queries.</p>
  
  <p>I have a working postgresql query that i need to implement in jpql.</p>
  
  <p>Select * from sql_sent_sms where match_url LIKE any (array['%ctid=123%','%ctid=231%']);</p>
  
  <p>This displays all rows with the that matches value of column match_url to the array.</p>
  
  <p>Now i want to use this in jpa native query but it gives me error while providing the array.</p>
  
  <p>This is what i have tried:</p>
  
  <pre><code>    List&lt;String&gt; arrctid =  Arrays.asList("%ctid=2141234%","%ctid=4be2a864-6e20-4686-b0f2-e3f432752c3d%");
  
  Query query = em.createQuery("SELECT test.receiver  FROM Sql_test test"+"WHERE test.match_url like any (arrctid) and test.service=:sysuserId ");
  query.setParameter("arrctid", arrctid );
  query.setParameter("sysuserId", sysuserId);
  </code></pre>
  
  <p>I have also tried</p>
  
  <pre><code>Query query = em.createQuery("SELECT test.receiver  FROM Sql_test test"+"WHERE test.match_url like any (:arrctid) and test.service=:sysuserId ");
  
  Query query = em.createQuery("SELECT test.receiver  FROM Sql_test test"+"WHERE test.match_url like any :arrctid and test.service=:sysuserId ");
  </code></pre>
  
  <p>But nothing is working.</p>
  
  <p>Can anybody tell me how to set array parameter with like any operator.</p>