title: Parameter value [1410] did not match expected type [java.util.Set (n/a)]
body: <p>I have a method in JPA repository that takes Set as an argument which I am having an Integer to be passed which I have to convert into Long and then add it to a Set and pass it to the method.</p>
  
  <p>After doing these steps I am getting InvalidDataAccessApiUsageException: Parameter value [1410] did not match expected type [java.util.Set (n/a)] Exception.</p>
  
  <p>My Repository method:</p>
  
  <pre><code>  @Query("select detail from #{#entityName} detail"
        + " WHERE " + " detail.master.id = :masterId"
        + " and detail.product = :product and detail.llMERestrictedProviders in :providerId"
       )
   Optional&lt;List&lt;BlackholeDetailEntity&gt;&gt; findByProductLLME(@Param("product") ProductType product,
        @Param("masterId") Long masterId, @Param("providerId") Set&lt;Long&gt; providerId);
  </code></pre>
  
  <p>My calling Code:</p>
  
  <pre><code>Set&lt;Long&gt; providers = new HashSet&lt;Long&gt;();
        providers.add(new Long(pricingCopyRequestBO.getProviderId()));
  
          blackholeOfferlist =
              blackholeDetailRepository.findByProductLLME(pricingCopyRequestBO.getProductType(),
                  pricingCopyRequestBO.getSourcePolygonId(), providers);
  </code></pre>
  
  <p>I have tried Long.valueof(pricingCopyRequestBO.getProviderId()) as well</p>