@Override
    @SuppressWarnings("unchecked")
    public T fetchOne() throws NonUniqueResultException {
        Query query = createQuery();
        return (T) uniqueResult(query);
    }
Transforms results using FactoryExpression if ResultTransformer can't be used

@param query query
@return single result
querydsl-jpa/src/main/java/com/querydsl/jpa/sql/AbstractJPASQLQuery.java