This problem is fixed, by https://issues.apache.org/jira/browse/OFBIZ-1045

2008/11/30 guo weizhan <[EMAIL PROTECTED]>

> I updated the last version today, and still got this error...
>
> 2008/11/30 David E Jones <[EMAIL PROTECTED]>
>
>
>> Which revision or version of OFBiz are you using?
>>
>> -David
>>
>>
>>
>> On Nov 29, 2008, at 10:36 AM, guo weizhan wrote:
>>
>> Do you guys use the FindServices? It's seems there is the problem in
>>> createCondition method when using the "IN" operator, the
>>> EntityCondition.makeCondition need a collection as the value when using
>>> IN
>>> operatot, but it's always pass the String value to this method, so It's
>>> throw the exception "Message: Error in Service [executeFind]: Error
>>> running
>>> Find on the [PartyAndUserLoginAndPerson] entity: SQL Exception while
>>> executing the following:SELECT PTY.PARTY_ID, PTY.PARTY_TYPE_ID,
>>> PTY.CREATED_DATE, ULN.USER_LOGIN_ID, ULN.CURRENT_PASSWORD,
>>> ULN.PASSWORD_HINT, ULN.ENABLED, ULN.DISABLED_DATE_TIME,
>>> ULN.SUCCESSIVE_FAILED_LOGINS, PER.LAST_NAME, PER.FIRST_NAME FROM
>>> (OFBIZ.PARTY PTY INNER JOIN OFBIZ.USER_LOGIN ULN ON PTY.PARTY_ID =
>>> ULN.PARTY_ID) INNER JOIN OFBIZ.PERSON PER ON PTY.PARTY_ID = PER.PARTY_ID
>>> WHERE (PTY.PARTY_ID IN ?) (Syntax error: Encountered "?" at line 1,
>>> column
>>> 384.)"
>>>
>>> I have changed the code like this:
>>> if (ignoreCase != null && ignoreCase.equals("Y")) {
>>>            if(opString!= null && opString.equals("in")){
>>>             cond =
>>> EntityCondition.makeCondition(EntityFunction.UPPER_FIELD(fieldName),
>>> (EntityComparisonOperator) fieldOp,toList(fieldValue.toUpperCase()));
>>>            }
>>>            else
>>>             cond =
>>> EntityCondition.makeCondition(EntityFunction.UPPER_FIELD(fieldName),
>>> (EntityComparisonOperator) fieldOp,
>>> EntityFunction.UPPER(fieldValue.toUpperCase()));
>>>           } else {
>>>            if(opString!= null && opString.equals("in")){
>>>             cond = EntityCondition.makeCondition(fieldName,
>>> (EntityComparisonOperator) fieldOp,toList(fieldValue));
>>>            }
>>>            else
>>>             cond = EntityCondition.makeCondition(fieldName,
>>> (EntityComparisonOperator) fieldOp, fieldValue);
>>>           }
>>> .....
>>>
>>> Is the bug or I miss something??
>>>
>>> Thank you!
>>>
>>
>>
>

Reply via email to