[
https://issues.apache.org/jira/browse/OFBIZ-9890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726647#comment-16726647 ]
Gareth Carter commented on OFBIZ-9890:
--------------------------------------
Hi [~jacques.le.roux]
I have provided a minor patch which I think will solve the issue. Can you check it out? I did run full test suite but I did not get test results file (not sure why).
Summary of patch
* If Entity to query is not a DynamicViewEntity *and* there is no having condition use findList
* All other conditions use queryIterator (which already supports having)
I had tried to completely remove findList, unfortunately this comes up with numerous exceptions in the log relating to queries running outside a transaction. I have no time to fix these so I opted for a simplified solution
> Having condition is ignored on queryList() and queryFirst() calls in EntityQuery
> --------------------------------------------------------------------------------
>
> Key: OFBIZ-9890
> URL:
https://issues.apache.org/jira/browse/OFBIZ-9890> Project: OFBiz
> Issue Type: Bug
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Gareth Carter
> Assignee: Gareth Carter
> Priority: Minor
> Attachments: OFBIZ-9890.patch
>
>
> queryList() and queryFirst() both call internal private query() method. This method calls delegator.findList if a normal Entity/ViewEntity is used (not a DVE). This has no option to include a having condition and so must opt to use queryIterator(). Even queryCount() can use a having condition
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)