Retrieve ordered results
This commit is contained in:
@@ -17,7 +17,7 @@ class FindingController extends AbstractController
|
||||
{
|
||||
$repo = $em->getRepository(Finding::class);
|
||||
|
||||
$findings = $repo->findAll();
|
||||
$findings = $repo->findBy([], ['label' => 'ASC']);
|
||||
|
||||
foreach($findings as $key => $finding) {
|
||||
$coords = $repo->coordinates($finding->getId());
|
||||
|
||||
@@ -20,7 +20,7 @@ class NotConservedController extends AbstractController
|
||||
//$repoBib = $em->getRepository(Bibliography::class);
|
||||
$repoImg = $em->getRepository(Image::class);
|
||||
|
||||
$records = $repo->findBy([], ['id' => 'ASC']);
|
||||
$records = $repo->findBy([], ['label' => 'ASC']);
|
||||
|
||||
// Terrible? N+1..
|
||||
foreach ($records as $key => $record) {
|
||||
|
||||
@@ -18,7 +18,7 @@ class PrehistoricController extends AbstractController
|
||||
$repo = $em->getRepository(Prehistoric::class);
|
||||
//$repoBib = $em->getRepository(Bibliography::class);
|
||||
|
||||
$records = $repo->findBy([], ['id' => 'ASC']);
|
||||
$records = $repo->findBy([], ['label' => 'ASC']);
|
||||
|
||||
// Terrible? N+1..
|
||||
foreach ($records as $key => $record) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class SiteController extends AbstractController
|
||||
{
|
||||
$repo = $em->getRepository(Site::class);
|
||||
|
||||
$sites = $repo->findAll();
|
||||
$sites = $repo->findBy([], ['label' => 'ASC']);
|
||||
|
||||
// TODO N+1...
|
||||
foreach($sites as $key => $site) {
|
||||
|
||||
Reference in New Issue
Block a user