Biblio and images for Finding
This commit is contained in:
@@ -40,6 +40,31 @@ class BibliographyRepository extends ServiceEntityRepository
|
||||
|
||||
$query->setParameter('id', $notConserId);
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
/**
|
||||
* @return Bibliography[]
|
||||
*/
|
||||
public function findAllByFinding(int $findingId): array
|
||||
{
|
||||
$rsm = new ResultSetMappingBuilder($this->getEntityManager());
|
||||
$rsm->addRootEntityFromClassMetadata('App\Entity\Bibliography', 'b');
|
||||
$query = $this->getEntityManager()->createNativeQuery(
|
||||
'SELECT
|
||||
id,
|
||||
citazione,
|
||||
riferimento,
|
||||
pagine
|
||||
FROM bibliografia b
|
||||
JOIN bibliografia_rinvenim
|
||||
ON id_bibliografia = b.id
|
||||
WHERE id_rinvenimento = :id
|
||||
ORDER BY ordine ASC',
|
||||
$rsm
|
||||
);
|
||||
|
||||
$query->setParameter('id', $findingId);
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user