title: expecting IDENT, found '*' near line 1
body: <p>I want to implement JPA query with INNER JOIN. I tried this:</p>
  
  <pre><code>@Override
      public Optional&lt;PaymentTransactions&gt; paymentTransactionByWpfPaymentId(Integer id) {
          String hql = "SELECT t.* FROM " + PaymentTransactions.class.getName() + " t " 
                  + " INNER JOIN " + WpfPaymentPaymentTransactions.class.getName() + " wppt "
                  + " ON t.id = wppt.payment_transaction_id " 
                  + " WHERE wppt.wpf_payment_id = :id "
                  + " ORDER BY t.id ASC LIMIT 1";
          TypedQuery&lt;PaymentTransactions&gt; query = entityManager.createQuery(hql, PaymentTransactions.class).setParameter("id", id);
          List&lt;PaymentTransactions&gt; wpfPayments = query.getResultList();
          return wpfPayments.isEmpty() ? Optional.empty() : Optional.of(wpfPayments.get(0));
      }
  </code></pre>
  
  <p>But I get this error when I run the code:</p>
  
  <pre><code>Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: expecting IDENT, found '*' near line 1, column 10 [SELECT t.* FROM org.datalis.plugin.entity.PaymentTransactions t  INNER JOIN org.datalis.plugin.entity.WpfPaymentPaymentTransactions wppt  ON t.id = wppt.payment_transaction_id  WHERE wppt.wpf_payment_id = :id  ORDER BY t.id ASC LIMIT 1]
  </code></pre>
  
  <p>Do you know how I can fix this issue and what's causing it?</p>
  
  <p>Probably I need to implement Spring Repository and make native query?</p>