EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

setSearchFields does not work for Embedded classes.

Open tskorupka opened this issue 2 months ago • 0 comments

Describe the bug I wanted to configure CrudController -> configureCrud and use setSearchFields to target my associated entity embedded property.

To Reproduce

easycorp/easyadmin-bundle 4.26.5

public function configureCrud(Crud $crud): Crud
    {
        return parent::configureCrud($crud)->setSearchFields([
            "issue.issueDescription.name",
        ]);
    }

class contains

    #[Embedded(class: IssueDescription::class)]
    private IssueDescription $issueDescription;

inside embedded there is a text field.

(OPTIONAL) Additional context

[2025-10-29T13:17:37.858533+00:00] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "The "issueDescription" field does not exist in the "App\Domain\Issue\Model\Issue" entity." at EntityDto.php line 215 {"exception":"[object] (InvalidArgumentException(code: 0): The \"issueDescription\" field does not exist in the \"App\\Domain\\Issue\\Model\\Issue\" entity. at /app/vendor/easycorp/easyadmin-bundle/src/Dto/EntityDto.php:215)"} []

tskorupka avatar Oct 29 '25 13:10 tskorupka