title: how to pass Map or List<Object> as a parameter to JPA query
body: <p>I need to pass a map as input parameter of type &lt;Sting,String&gt; or List  into two JPA columns and get the result as List of records for all the entries in the map/list.</p>
  <p>Something like this:</p>
  <pre><code>@Query(
        value =
            &quot;SELECT e from #{#entityName} e where e.name = KEY(someMap) and e.relationName = VALUE(someMap)&quot;)
    List&lt;Member&gt; findByNameAndRelationNameIn(
            @Param(&quot;someMap&quot;) Map&lt;String, String&gt; someMap);
  </code></pre>
  <p>OR</p>
  <pre><code>@Query(
        value =
            &quot;SELECT e from #{#entityName} e where e.name IN (:#{#dataSpaceMembers.?[name]}) and e.dataSpaceName IN (:#{#dataSpaceMembers.?[dataSpaceName]})&quot;)
    List&lt;DataSpaceMember&gt; findByNameAndDataSpaceIn(
        @Param(&quot;dataSpaceMembers&quot;) List&lt;DataSpaceMember&gt; dataSpaceMembers);
  </code></pre>
  <p>But the application doesn't run since this is not a valid jpa query.
  I don't want to run single queries in loop, but looking for a single query which can give result as a list.</p>