EasyAdminBundle
EasyAdminBundle copied to clipboard
SetSearchFields method does not work if you use more than 3 level of nesting of the properties
Describe the bug
In our project, we use a search field with more than 3 levels of nesting of the properties.
invoiceLine.invoice.originOrder.code
The generated query: SELECT entity FROM App\Entity\PrintSale entity LEFT JOIN entity.invoiceLine invoiceLine LEFT JOIN invoiceLine.invoice invoice1 LEFT JOIN invoice.originOrder originOrder2 WHERE LOWER(CONCAT(originOrder2.code, '')) LIKE :query_for_text_1 ORDER BY entity.created DESC
The query builder don't use the alias for the 3rd LEFT JOIN.
(OPTIONAL) Additional context ref issue https://github.com/EasyCorp/EasyAdminBundle/issues/6387 and the fix https://github.com/EasyCorp/EasyAdminBundle/pull/6388