 <p>Try marking the <code>@ManyToOne</code> field as lazy: </p> <pre><code>@ManyToOne(fetch = FetchType.LAZY) private Account account; </code></pre> <p>And change your query using a <code>JOIN FETCH</code> of the <code>account</code> field to generate only one query with all you need, like this:</p> <pre><code>String sql = "SELECT new com.test.Pojo(acc, SUM(t.value)) " + "FROM Transaction t JOIN FETCH t.account acc GROUP BY acc"; </code></pre> <p><strong>UPDATE:</strong></p> <p>Sorry, you're right, the fetch attribute of <code>@ManyToOne</code> is not required because in Hibernate that is the default value. The <code>JOIN FETCH</code> isn't working, it's causing a <code>QueryException</code>: "Query specified join fetching, but the owner of the fetched association was not present".</p> <p>I have tried with some other approaches, the most simple one that avoids doing n + 1 queries is to remove the creation of the <code>Pojo</code> object from your query and process the result list, manually creating the objects:</p> <pre><code>String hql = "SELECT acc, SUM(t.value)" + " FROM " + Transaction.class.getName() + " t" + " JOIN t.account acc" + " GROUP BY acc"; Query query = getEntityManager().createQuery(hql); List&lt;Pojo&gt; pojoList = new ArrayList&lt;&gt;(); List&lt;Object[]&gt; list = query.getResultList(); for (Object[] result : list) pojoList.add(new Pojo((Account)result[0], (BigDecimal)result[1])); </code></pre>