EagerLoadingExtension does not check whether the query builder already defines exact join clause.
If another extension adds join before the EagerLoadingExtension it will result with duplicate join clauses.
Hi ! I would love to help you on this issue/
I could get all previously used aliases with $queryBuilder->getAllAliases() and check if the current $association matches one part of existing aliases.
What do you think @soyuka @dunglas ?
Hi @victorbrun we have methods like this one:
https://github.com/api-platform/core/blob/5f7eaf3df1e580a41ea7274c2de868f74fc14353/src/Bridge/Doctrine/Orm/Util/QueryChecker.php#L168
They should be used there, what I'd do first is to try to reproduce a failing test case, then I'd try to fix it using these checks.
Not sure if this is obvious but we should check for any join type, not just a lefty.
Cheers