@Override
    @SuppressWarnings("unchecked")
    public QueryResults<T> fetchResults() {
        Query countQuery = createQuery(true);
        countQuery.setUnique(true);
        long total = (Long) execute(countQuery, true);
        if (total > 0) {
            QueryModifiers modifiers = queryMixin.getMetadata().getModifiers();
            Query query = createQuery(false);
            return new QueryResults<T>((List<T>) execute(query, false), modifiers, total);
        } else {
            return QueryResults.emptyResults();
        }
    }
Close the query and related resources
querydsl-jdo/src/main/java/com/querydsl/jdo/sql/AbstractSQLQuery.java