@Override
    public QueryResults<T> fetchResults() {
        try {
            Query countQuery = createQuery(null, true);
            long total = (Long) countQuery.uniqueResult();

            if (total > 0) {
                QueryModifiers modifiers = getMetadata().getModifiers();
                Query query = createQuery(modifiers, false);
                @SuppressWarnings("unchecked")
                List<T> list = query.list();
                return new QueryResults<T>(list, modifiers, total);
            } else {
                return QueryResults.emptyResults();
            }
        } finally {
            reset();
        }
    }
Return the query results as an {@code Iterator}. If the query
contains multiple results pre row, the results are returned in
an instance of {@code Object[]}.<br>
<br>
Entities returned as results are initialized on demand. The first
SQL query returns identifiers only.<br>
querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/AbstractHibernateQuery.java