Test relations for bibliography

This commit is contained in:
2024-11-04 22:08:44 +01:00
parent 0a41ff4a7b
commit a2f518ee15
5 changed files with 33 additions and 7 deletions

View File

@@ -14,7 +14,8 @@ class CollectionController extends AbstractController
#[Route('/collection/{id<\d+>}', name: 'app_collection')]
public function index(Collection $collection, EntityManagerInterface $em): Response
{
$bibliographies = $em->getRepository(Bibliography::class)->findAllCollection($collection->getId());
$repo = $em->getRepository(Bibliography::class);
$bibliographies = $repo->findAllByCollection($collection->getId());
$collection->setBibliographies($bibliographies);