@@ -315,6 +315,7 @@ public function testFetchEagerWithNoForceEager()
315
315
->from (CompositeRelation::class, 'o ' )
316
316
->innerJoin ('o.compositeItem ' , 'item ' )
317
317
->innerJoin ('o.compositeLabel ' , 'label ' )
318
+ ->leftJoin ('o.foo ' , 'foo ' , 'WITH ' , 'o.bar = item.foo ' )
318
319
->where ('item.field1 = :foo ' )
319
320
->setParameter ('foo ' , 1 );
320
321
@@ -323,6 +324,8 @@ public function testFetchEagerWithNoForceEager()
323
324
$ queryNameGenerator ->generateJoinAlias ('label ' )->shouldBeCalled ()->willReturn ('label_2 ' );
324
325
$ queryNameGenerator ->generateJoinAlias ('o ' )->shouldBeCalled ()->willReturn ('o_2 ' );
325
326
327
+ $ queryNameGenerator ->generateJoinAlias ('foo ' )->shouldBeCalled ()->willReturn ('foo_2 ' );
328
+
326
329
$ filterEagerLoadingExtension = new FilterEagerLoadingExtension ($ resourceMetadataFactoryProphecy ->reveal (), false );
327
330
$ filterEagerLoadingExtension ->applyToCollection ($ qb , $ queryNameGenerator ->reveal (), CompositeRelation::class, 'get ' );
328
331
@@ -331,15 +334,18 @@ public function testFetchEagerWithNoForceEager()
331
334
FROM ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\CompositeRelation o
332
335
INNER JOIN o.compositeItem item
333
336
INNER JOIN o.compositeLabel label
337
+ LEFT JOIN o.foo foo WITH o.bar = item.foo
334
338
WHERE o.item IN(
335
339
SELECT IDENTITY(o_2.item) FROM ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\CompositeRelation o_2
336
340
INNER JOIN o_2.compositeItem item_2
337
341
INNER JOIN o_2.compositeLabel label_2
342
+ LEFT JOIN o_2.foo foo_2 WITH o_2.bar = item_2.foo
338
343
WHERE item_2.field1 = :foo
339
344
) AND o.label IN(
340
345
SELECT IDENTITY(o_2.label) FROM ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\CompositeRelation o_2
341
346
INNER JOIN o_2.compositeItem item_2
342
347
INNER JOIN o_2.compositeLabel label_2
348
+ LEFT JOIN o_2.foo foo_2 WITH o_2.bar = item_2.foo
343
349
WHERE item_2.field1 = :foo
344
350
)
345
351
SQL ;
0 commit comments