EasyAdminBundle
EasyAdminBundle copied to clipboard
Search on DQL protected field as association
Describe the bug
I am having an entity linked to another which className is "Group".
"Group" is Linked to a 3rd entity called "Foo".
I want to search in the bar field of Foo.
So I do: $crud->setSearchFields(['group.name', 'group.foo.bar'])
I am getting the following error :
Error: Identification Variable group used in join path expression but was not defined before.
I can see the logic here beacuse Group is protected by adding ea_ prefix in the DQL (see in the additional context below).
So I tried
$crud->setSearchFields(['ea_group.foo.bar'])
But then i get the error
The "ea_group" field does not exist
Additional context Here is the original PR that created the ea_ prefix to FIX the initial bug. https://github.com/EasyCorp/EasyAdminBundle/pull/4806/files