You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/03/24 01:37:51 UTC
svn commit: r521954 -
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java
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;
}
Re: svn commit: r521954 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFunction.java
Posted by "David E. Jones" <jo...@undersunconsulting.com>.
Looks good Si. Thanks for taking care of that.
-David
On Mar 23, 2007, at 6:37 PM, sichen@apache.org wrote:
> 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;
> }
>
>