David E Jones wrote:
> For that call the sorting is done in the database (not cached), so there's
> probably a difference in databases or database configs.
Not entirely accurate. The first match on a condition/entity is
cached, as it is returned from the database. If a later call is only
different on the ordering, then the system just reorders in memory
from the previously cached query.
> On Apr 23, 2010, at 8:49 AM, Divesh Dutta wrote:
>
>> Hello Developers,
>>
>> I see an strange issue on Release 9.04. But that issue does not exists on
>> latest OFBiz trunk. Below is brief description of issue:
>>
>> 1) When I use any of the method (like findList or findByAnd) of
>> DelegatorImpl.java class , and sort it by "sequenceNum", For eg in
>> EditProductFeatures.groovy: (Release 9.04)
>>
>> context.productFeatureAndAppls =
>> delegator.findList('ProductFeatureAndAppl',
>> EntityCondition.makeCondition([productId : productId]), null,
>> ['sequenceNum', 'productFeatureApplTypeId', 'productFeatureTypeId',
>> 'description'], null, false);
>>
>> It returns me the list of values, with *Not-Null values at the top* , and
>> then it sort in Ascending order by "sequenceNum", ......
>>
>> 2) But When I use Latest trunk in OFBiz: Using same example, It returns me
>> the list sorted by "sequenceNum", .... in ascending order and then *Not-null
>> values at the bottom
>>
>> *3) I think this is the major bug in Release 9.04, because if we think at
>> application level, if a catagory has over 800 products, Catalog Manager will
>> have to go to the last page, to sequence every single product for it to show
>> properly on the front end.
>>
>> 4) Instead if Catalog Manager want to sequence the products, he will
>> arrange them at very first page.
>>
>> 5) I tried to found the reason of this major difference, but could not
>> locate the exact fix in any of the commit. So I request all the developers,
>> if any one have any idea regarding this please share your views here. Also I
>> think this should be fixed in Release 9.04 as well.
>>
>> Thanks
>> --
>> Divesh Dutta.
>>
>