You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function setQueryBuilder takes a Closure with the repository injected at the first argument.
However, it seems that it is the QueryBuilder that is injected
App\Controller\Admin\PropertyCrudController::App\Controller\Admin{closure}(): Argument #1 ($repository) must be of type App\Repository\SupplierRepository, Doctrine\ORM\QueryBuilder given
Is it a bug in the documentation ?
My question : Is it possible to retrieve the corresponding Repository from the QueryBuilder ?
To Reproduce
Just create a simple crud with an AssociatedField : yield Field\AssociationField::new('myProperty')->setQueryBuilder(function (SupplierRepository $repository) { } ));
The text was updated successfully, but these errors were encountered:
Describe the bug
According to the documentation
https://symfony.com/bundles/EasyAdminBundle/current/fields/AssociationField.html#setquerybuilder
The function
setQueryBuilder
takes a Closure with the repository injected at the first argument.However, it seems that it is the
QueryBuilder
that is injectedIs it a bug in the documentation ?
My question : Is it possible to retrieve the corresponding Repository from the QueryBuilder ?
To Reproduce
Just create a simple crud with an AssociatedField :
yield Field\AssociationField::new('myProperty')->setQueryBuilder(function (SupplierRepository $repository) { } ));
The text was updated successfully, but these errors were encountered: