title: Parameter value did not match expected type (Spring Data JPA)
body: <p>Let's say I have class A and B</p>
  
  <pre><code>public class A{
  @Id
  String id;
  private B b;
  }
  
  public class B{
  @Id
  String id;
  private List&lt;A&gt; a;
  }
  </code></pre>
  
  <p>I'm using <code>@Query</code>for my query since my query is too long for Query creation .</p>
  
  <pre><code>@Query("select a from A a where  b = :b")
  public List&lt;A&gt; findSomething(@Param("b") String bId);
  </code></pre>
  
  <p>However, when I use that query it shows</p>
  
  <pre><code>Parameter value  did not match expected type [B (n/a)]
  </code></pre>