static boolean isEntityPath(Path<?> path) {
        if (path instanceof CollectionPathBase) {
            return isEntityPath((Path<?>) ((CollectionPathBase) path).any());
        } else {
            return path instanceof EntityPath
                || path.getType().isAnnotationPresent(Entity.class);
        }
    }
{@code JPAQueryMixin} extends {@link QueryMixin} to support JPQL join construction

@author tiwe

@param <T>
querydsl-jpa/src/main/java/com/querydsl/jpa/JPAQueryMixin.java