protected boolean isEntityExpression(Expression<?> expr) {
        return expr instanceof EntityPath || expr.getType().isAnnotationPresent(Entity.class);
    }
Abstract super class for SQLQuery implementation for JPA and Hibernate

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

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