title: How to get the results from multiple tables join using single query in Spring Data JPA?
body: <p>I have to fetch the data from multiple tables by joining them using NativeQuery like below:</p>
  
  <pre><code>    String query = "Select ad.* from address_data ad inner join address a ON a.ad_id = ad.ad_id where address = :address";
      Query q = entityManager.createNativeQuery(query, AddressData.class);
      q.setParameter("address", address);
  
      List&lt;AddressData&gt; permitList = q.getResultList();
  </code></pre>
  
  <p>On testing the code, 2 queries are created to fetch the data. </p>
  
  <ol>
  <li>to get the data from address_data table</li>
  <li>to get the data from address table</li>
  </ol>
  
  <p>How can I get only one query to fetch the data ?</p>