svn commit: r1038228 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1038228 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

jleroux@apache.org
Author: jleroux
Date: Tue Nov 23 17:51:13 2010
New Revision: 1038228

URL: http://svn.apache.org/viewvc?rev=1038228&view=rev
Log:
A patch from Sascha Rodekamp "Paging for products in category mgr is not correct" (https://issues.apache.org/jira/browse/OFBIZ-4033) - OFBIZ-4033

As you can see at https://demo-trunk.ofbiz.apache.org/catalog/control/EditCategoryProducts?productCategoryId=100
The number of products is 'one' (but there are more than one). It's related to the distinct operator in the EntityFindOptions.

This patch fixes the issue and shows the paging in the right way.

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1038228&r1=1038227&r2=1038228&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Tue Nov 23 17:51:13 2010
@@ -318,7 +318,7 @@ public class CategoryServices {
                     EntityCondition mainCond = EntityCondition.makeCondition(mainCondList, EntityOperator.AND);
 
                     // set distinct on
-                    EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
+                    EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, false);
                     findOpts.setMaxRows(highIndex);
                     // using list iterator
                     EntityListIterator pli = delegator.find(entityName, mainCond, null, null, orderByFields, findOpts);