title: native query join in spring data
body: <p>I have the class: </p>
  
  <pre><code>@Entity
  public class User {
      @Id
      Long id;
      String name;
  
      @ManyToMany
      List&lt;Mission&gt; missions;
  }
  
  @Entity
  public class Mission {
      @Id
      Long id;
      String name;
  
      @ManyToMany
      List&lt;User&gt; users;
  }
  
  public interface MissionRepository extends CrudRepository&lt;Mission, Long&gt; {
      @Query(nativeQuery = true, "select * from mission join user on id = user_id where name = ?1")
      public List&lt;Mission&gt; findByname(String name);
  }
  </code></pre>
  
  <p>I want to know if it's possible to use a native query join in spring data JPA and if the result of query was correctly mapped into entities like the above example. </p>
  
  <p>Can someone show me a complete example to user this. 
  I must to use a native query  in my case and I am not sure that work.</p>