@Override
    public QueryResults<T> fetchResults() {
        try {
            Query countQuery = createQuery(true);
            countQuery.setUnique(true);
            countQuery.setResult("count(this)");
            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();
            }
        } finally {
            reset();
        }
    }
Close the query and related resources
querydsl-jdo/src/main/java/com/querydsl/jdo/AbstractJDOQuery.java