EntityUtil.filterByCondition() fails for condition with 'IN' operator
---------------------------------------------------------------------

                 Key: OFBIZ-1933
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1933
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
         Environment: Linux (Ubuntu 8.04), PostgreSQL 8.2
            Reporter: Rajib Khan


EntityUtil.filterByCondition() throws following exception while condition is 
made using "IN" operator:

Target exception: java.lang.ClassCastException: javolution.util.FastList cannot 
be cast to java.lang.Comparable

How to reproduce:
1) put following code in file 
"framework/common/script/org/ofbiz/common/BshServiceTest.bsh"  
2) from webtools run service: "testBsh"

import java.util.List;
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;

GenericDelegator delegator = GenericDelegator.getGenericDelegator("default");
List users = delegator.findAll("UserLogin");

List userIds = EntityUtil.getFieldListFromEntityList(users, "userLoginId", 
true);
Debug.log("*** list of user ids = " + userIds);

////////////  fails here ///////////
List filteredUsers = EntityUtil.filterByCondition(users, 
EntityCondition.makeCondition("userLoginId", EntityOperator.IN, userIds));
Debug.log("*** total filtered users = " + filteredUsers.size());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to