mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine.ORM.EntityRepository->createQueryBuilder #5007
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joshuayoung1380 on GitHub (Feb 4, 2016).
EntityRepository->createQueryBuilder does not provide to way to set the indexBy.
http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.EntityRepository.html
EntityManager->createQueryBuilder allows the indexBy to be set via the from method
http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/query-builder.html#high-level-api-methods
EntityRepository->createQueryBuilder calls from for you, but does not all have an option for indexBy.
the EntityRepository->createQueryBuilder is used to in symfony's EntityType field for creating forms.
i was trying to index my arrayCollection by an id field for my form, just i preference that over a 0 indexed key.
http://symfony.com/doc/current/reference/forms/types/entity.html
Should EntityRepository's createQueryBuilder method allow for this?
@Ocramius commented on GitHub (Feb 4, 2016):
@joshuayoung1380 can you rephrase your question? It is really unclear:
@joshuayoung1380 commented on GitHub (Feb 4, 2016):
i may have been mistaking on how this was intended to work