From 6df5f511e8af0b635cebb1c66419ac5f8b5285c0 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Mon, 24 Dec 2018 14:58:24 +0000 Subject: [PATCH] =?UTF-8?q?"Applied=20fix=20from=20trunk=20for=20revision:?= =?UTF-8?q?=201849693=20=20"=20-------------------------------------------?= =?UTF-8?q?-----------------------------=20r1849693=20|=20jleroux=20|=2020?= =?UTF-8?q?18-12-24=2015:57:08=20+0100=20(lun.=2024=20d=C3=A9c.=202018)=20?= =?UTF-8?q?|=2013=20lignes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed: Having condition is ignored on queryList() and queryFirst() calls in EntityQuery (OFBIZ-9890) queryList() and queryFirst() both call internal private query() method. This method calls delegator.findList if a normal Entity/ViewEntity is used (not a DVE). DVE has no option to include a having condition and so must opt to use queryIterator(). Even queryCount() can use a having condition. Thanks: Rupert Howell and Gareth Carter for report, Prakhar Kumar for discussion and Gareth Carter for the fix ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849694 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java index 464f9f12c3..068a319baf 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java @@ -447,7 +447,7 @@ public class EntityQuery { findOptions = efo; } List result = null; - if (dynamicViewEntity == null) { + if (dynamicViewEntity == null && this.havingEntityCondition == null) { result = delegator.findList(entityName, makeWhereCondition(useCache), fieldsToSelect, orderBy, findOptions, useCache); } else { try (EntityListIterator it = queryIterator()) {