From 86f4f59f5e02415a4945ae879e14d4034308dbb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 28 Jan 2024 06:48:02 +0000 Subject: [PATCH] Use entity id as last resort sorting parameter --- Repository/ArticleRepository.php | 2 +- Repository/KeywordRepository.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Repository/ArticleRepository.php b/Repository/ArticleRepository.php index a19d63c..a2e1a5e 100644 --- a/Repository/ArticleRepository.php +++ b/Repository/ArticleRepository.php @@ -79,7 +79,7 @@ LEFT JOIN RapsysBlogBundle:ArticleKeyword AS ak ON (ak.article_id = a.id) LEFT JOIN RapsysBlogBundle:Keyword AS k ON (k.id = ak.keyword_id) LEFT JOIN RapsysBlogBundle:KeywordTranslation AS kt ON (kt.keyword_id = k.id AND kt.locale = :locale) GROUP BY a.id -ORDER BY updated, created DESC +ORDER BY updated, created DESC, a.id LIMIT :offset, :count SQL; diff --git a/Repository/KeywordRepository.php b/Repository/KeywordRepository.php index f531711..4bd8aa8 100644 --- a/Repository/KeywordRepository.php +++ b/Repository/KeywordRepository.php @@ -72,7 +72,7 @@ SELECT FROM RapsysBlogBundle:Keyword AS k JOIN RapsysBlogBundle:KeywordTranslation AS kt ON (kt.keyword_id = k.id AND kt.locale = :locale) GROUP BY k.id -ORDER BY updated, created DESC +ORDER BY updated, created DESC, k.id LIMIT :offset, :count SQL; -- 2.41.0