title: Return type for the method is missing: @query from two tables
body: <p>I want to return users from two tables but the following code is not working</p>
  <pre><code> @Query(value = &quot;SELECT DISTINCT u.*, p.nom FROM user u INNER JOIN person p ON u.ID = p.user_id &quot;, nativeQuery = true)
      Page&lt;User&gt; findAllUsers(Pageable pageable);
  </code></pre>
  <p>I searched I found that I should add a for loop like in this anwser <a href="https://stackoverflow.com/questions/47300459/query-multi-tables-columns-with-join-in-spring-data-jpa">Query multi tables&#39; columns with join in spring data jpa</a>
  I tried to edit my code but the following generate an error</p>
  <pre><code>Page&lt;Object[]&gt; pages = findAllUsers(Pageable pageable);
      for(Object[] obj : pages){
         User user = (User) obj[0];
         String nom = (String) obj[1];
      }
  </code></pre>
  <p>what's wrong with this please ?</p>