@Override
    public JPAQuery<T> clone(EntityManager entityManager) {
        return clone(entityManager, JPAProvider.getTemplates(entityManager));
    }
Creates a new query

@param em entity manager
@param templates templates
@param metadata query metadata
querydsl-jpa/src/main/java/com/querydsl/jpa/impl/JPAQuery.java