From 111a6efcbbba51de15677fab1add894edbdb64c3 Mon Sep 17 00:00:00 2001 From: Roderik van der Veer Date: Mon, 28 Apr 2014 20:23:53 +0200 Subject: [PATCH] Logical ordering --- Entity/AnalyticsOverview.php | 1 + Repository/AnalyticsGoalRepository.php | 1 + 2 files changed, 2 insertions(+) diff --git a/Entity/AnalyticsOverview.php b/Entity/AnalyticsOverview.php index 3a68a216..1b719ed2 100755 --- a/Entity/AnalyticsOverview.php +++ b/Entity/AnalyticsOverview.php @@ -36,6 +36,7 @@ public function getNewUsersPercentage() /** * @ORM\OneToMany(targetEntity="AnalyticsGoal", mappedBy="overview", cascade={"persist"}) + * @ORM\OrderBy({"name" = "ASC"}) */ private $goals; diff --git a/Repository/AnalyticsGoalRepository.php b/Repository/AnalyticsGoalRepository.php index 21dd4a72..a77d54fa 100755 --- a/Repository/AnalyticsGoalRepository.php +++ b/Repository/AnalyticsGoalRepository.php @@ -18,6 +18,7 @@ public function getGoal($id) $qb->select('g') ->from('KunstmaanDashboardBundle:AnalyticsGoal', 'g') ->where('g.id = :id') + ->orderBy('g.name', 'asc') ->setParameter('id', $id); $results = $qb->getQuery()->getResult();