From 1bbd96de5532cdf2f1b289b4cfdcc2b4f2200cf7 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Thu, 24 Nov 2022 16:38:45 +0100 Subject: [PATCH] Update ThemeTable.php Set the limit 1 on fetching themes by anr and label. --- src/Model/Table/ThemeTable.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Model/Table/ThemeTable.php b/src/Model/Table/ThemeTable.php index 2b80022c..b21faa30 100755 --- a/src/Model/Table/ThemeTable.php +++ b/src/Model/Table/ThemeTable.php @@ -38,6 +38,7 @@ public function findByAnrIdAndLabel(?int $anrId, string $labelKey, string $label return $queryBuilder ->andWhere('t.' . $labelKey . ' = :' . $labelKey) ->setParameter($labelKey, $labelValue) + ->setMaxResults(1) ->getQuery() ->getOneOrNullResult(); }