-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AssociationField on nested properties fails #7514
Copy link
Copy link
Open
Milestone
Description
Describe the bug
When you are trying to access an association through a nested property it fails with
Association name expected, 'foo.bar' is not an association.
To Reproduce
Try to access an association through a nested property:
AssociationField::new('foo.bar', 'Bar'),
(OPTIONAL) Additional context
InvalidArgumentException:
Association name expected, 'foo.bar' is not an association.
at vendor/doctrine/orm/src/Mapping/ClassMetadata.php:2547
at Doctrine\ORM\Mapping\ClassMetadata->getAssociationTargetClass('foo.bar')
(vendor/easycorp/easyadmin-bundle/src/Field/Configurator/AssociationConfigurator.php:59)
at EasyCorp\Bundle\EasyAdminBundle\Field\Configurator\AssociationConfigurator->configure(object(FieldDto), object(EntityDto), object(AdminContext))
(vendor/easycorp/easyadmin-bundle/src/Factory/FieldFactory.php:106)
at EasyCorp\Bundle\EasyAdminBundle\Factory\FieldFactory->processFields(object(EntityDto), object(FieldCollection), 'index')
(vendor/easycorp/easyadmin-bundle/src/Factory/FieldFactory.php:132)
at EasyCorp\Bundle\EasyAdminBundle\Factory\FieldFactory->processFieldsForAll(object(EntityCollection), object(FieldCollection), 'index')
(vendor/easycorp/easyadmin-bundle/src/Controller/AbstractCrudController.php:158)
at EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController->index(object(AdminContext))
(vendor/symfony/http-kernel/HttpKernel.php:183)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:191)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/app/vendor/autoload_runtime.php')
(public/index.php:5)
Maybe @Seb33300 can take a look since he's cleaning up related bugs atm :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels