> Author: sichen
> Date: Fri Mar 23 17:37:50 2007
> New Revision: 521954
>
> URL:
http://svn.apache.org/viewvc?view=rev&rev=521954> Log:
> Fix entity engine's upper function to allow searches for names with
> an apostrophe in them. From Leon Torres. OFBIZ-837
>
> Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/
> EntityFunction.java
>
> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/
> condition/EntityFunction.java
> URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/
> org/ofbiz/entity/condition/EntityFunction.java?
> view=diff&rev=521954&r1=521953&r2=521954
> ======================================================================
> ========
> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/
> EntityFunction.java (original)
> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/
> EntityFunction.java Fri Mar 23 17:37:50 2007
> @@ -94,6 +94,8 @@
> codeString = code;
> if (value instanceof EntityConditionValue) {
> this.nested = (EntityConditionValue) value;
> + } else if (value instanceof String) {
> + this.value = ((String) value).replaceAll("'", "''");
> } else {
> this.value = value;
> }
>
>