protected JPQLSerializer serialize(boolean forCountRow, boolean validate) {
        if (validate) {
            if (queryMixin.getMetadata().getJoins().isEmpty()) {
                throw new IllegalArgumentException("No sources given");
            }
        }
        JPQLSerializer serializer = createSerializer();
        serializer.serialize(queryMixin.getMetadata(), forCountRow, null);
        return serializer;
    }
{@code JPAQueryBase} is a base Query class for JPA queries

@param <T> result type
@param <Q> concrete subtype

@author tiwe
querydsl-jpa/src/main/java/com/querydsl/jpa/JPAQueryBase.java