From 5d6a02e4a2b855028f6055b28f86275650fbe2fe Mon Sep 17 00:00:00 2001 From: Marc Reimann Date: Wed, 31 Mar 2021 00:08:32 +0200 Subject: [PATCH] Fix for only_full_group_by See #1419, #1356, #1412, #1335 --- src/Attribute/BaseSimple.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Attribute/BaseSimple.php b/src/Attribute/BaseSimple.php index beb4f8721..595d238de 100644 --- a/src/Attribute/BaseSimple.php +++ b/src/Attribute/BaseSimple.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2019 The MetaModels team. + * (c) 2012-2021 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,7 +18,7 @@ * @author Sven Baumann * @author David Molineus * @author Marc Reimann - * @copyright 2012-2019 The MetaModels team. + * @copyright 2012-2021 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -164,7 +164,7 @@ public function getFilterOptions($idList, $usedOnly, &$arrCount = null) ->from($this->getMetaModel()->getTableName()) ->where('id IN (:ids)') ->groupBy($strCol) - ->orderBy('FIELD(id, :ids)') + ->orderBy('MIN(FIELD(id, :ids))') ->setParameter('ids', $idList, Connection::PARAM_STR_ARRAY) ->execute(); } else {