Log Message: |
"Applied BY HAND fix from trunk framework for revision: 1804319 "
------------------------------------------------------------------------
r1804319 | jleroux | 2017-08-07 12:40:32 +0200 (lun. 07 août 2017) | 20 lignes
Fixed: Bug SQL Count Distinct command in GenericDAO.java
(OFBIZ-5701)
jleroux: Kieuanhvu's explanation was not totally clear. So I rather provide
Renuka Srishti's at OFBIZ-9428 "getResultsSizeAfterPartialList() return wrong
count with distinct() for View Entity"
Here is the code sample to test the issue:
EntityListIterator productAssocListItr = null;
productAssocListItr = from("ProductAndAssoc").distinct().queryIterator();
productAssocListSize = productAssocListItr.getResultsSizeAfterPartialList();
productAssocListSize will differ from the actual distinct records in the
ProductAndAssoc View Entity.
This issue exists because it gives distinct records on the basis of the
first column in the table.
Thanks: Kieuanhvu for the patch, Renuka Srishti for a clear explanation and a
simple way to test (in a groovy for me)
------------------------------------------------------------------------
|