[
https://issues.apache.org/jira/browse/OFBIZ-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239897#comment-13239897 ]
Mansour Al Akeel commented on OFBIZ-1933:
-----------------------------------------
Scott,
Is this still a valid bug?
Can it be closed ?
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira