From 1262fdbf29c5689bdaff29a9872258e7ea53cc17 Mon Sep 17 00:00:00 2001 From: David <44263817+mozkomor05@users.noreply.github.com> Date: Wed, 10 May 2023 08:13:26 +0200 Subject: [PATCH] fixed group by in count (#2734) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David Moškoř --- application/Espo/ORM/Mapper/BaseMapper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/Espo/ORM/Mapper/BaseMapper.php b/application/Espo/ORM/Mapper/BaseMapper.php index a479279fb6..6777ce4d3b 100644 --- a/application/Espo/ORM/Mapper/BaseMapper.php +++ b/application/Espo/ORM/Mapper/BaseMapper.php @@ -230,8 +230,7 @@ class BaseMapper implements RDBMapper ->build(); $wrap = $aggregation === self::FUNC_COUNT && ( - $select->isDistinct() || - $select->getGroup() && $select->getHaving() + $select->isDistinct() || $select->getGroup() ); if (!$wrap) {