You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2018/12/24 14:57:09 UTC
svn commit: r1849693 -
/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
Author: jleroux
Date: Mon Dec 24 14:57:08 2018
New Revision: 1849693
URL: http://svn.apache.org/viewvc?rev=1849693&view=rev
Log:
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
Modified:
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java?rev=1849693&r1=1849692&r2=1849693&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java Mon Dec 24 14:57:08 2018
@@ -447,7 +447,7 @@ public class EntityQuery {
findOptions = efo;
}
List<GenericValue> 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()) {