-
-
Notifications
You must be signed in to change notification settings - Fork 383
Open
Labels
AutocompleteRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
When your Entities repository does not extend \Doctrine\ORM\EntityRepository
, every request to the EntityAutocompleteController
will result in a type error.
This is because the repository is accessed through a wrapper around the Doctrine registry (\Symfony\UX\Autocomplete\Doctrine\DoctrineRegistryWrapper
), which instead of ObjectRepository
typehints \Doctrine\ORM\EntityRepository
.
The only case when methods of EntityRepository
that are not in ObjectRepository
are used, are however in
$queryBuilder = $queryBuilder ?: $repository->createQueryBuilder('entity'); |
'query_builder'
– only then, $repository->createQueryBuilder('entity');
is being used. It should be possible to use Entity Repositories that don't extend the Doctrine implementation as long as you provide a 'query_builder'
.
The normal EntityType
allows using repositories that don't descent from Doctrine's default implementation.
Metadata
Metadata
Assignees
Labels
AutocompleteRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)