Jira issue originally created by user @beberlei:
This issue is created automatically through a Github pull request on behalf of cmenning:
This is a handy shortcut when using indexed results.
Comment created by @beberlei:
A related Github Pull-Request [GH-592] was closed
Issue was closed with resolution "Invalid"
Comment created by cmenning:
I disagree with the reasoning behind closing this request. In DoctrineBundle, getDoctrine()->getEntityManager() has been deprecated, which leaves you to use getDoctrine()->getRepository($class)->createQueryBuilder();
Adding ->from() at that point is redundant since it's already been specified inside the createQueryBuilder() call. It seems wasteful to not allow a passthru of the $indexBy argument during the initial call when it's already supported by the from() called inside createQueryBuilder().
Comment created by @ocramius:
The repository is already (probably) doing too much. A simpler approach with:
$qb = $em->createQueryBuilder()->select('e')->from($repo->getClassName(), 'e', 'e.stuff')
Is no big deal in my opinion.
Comment created by @doctrinebot:
A related Github Pull-Request [GH-592] was closed: