title: How to JPA sub query works with parameters
body: <p>I am trying to writing this query. But this query giving me an error while fetching result. Please let me know whats wrong with query.</p>
  
  <pre><code>  List&lt;String[]&gt; returnList = new ArrayList&lt;String[]&gt;();
      String nativeQuery = "select EMP_NO, FIRST_NAME, LAST_NAME from isisdba.emplyee e where e.EMP_ACTIVE_IND='A' and e.END_DATE is null and" +
          "e.EMP_NO in (select er.EMP_NO from isisdba.employee_role er where er.ROLE_id in (select r.ROLE_ID from isisdba.roles r where r.ROLE_NAME in (:roles)))";
      Query query = em.createNativeQuery(nativeQuery);
      query.setParameter("roles"
  
  , roles);
  </code></pre>
  
  <p>Thanks in Advance</p>