Thanks Edgar, I've applied your patch to the standalone repository
(jakarta-turbine-torque).


"Edgar Gonzalez" <[EMAIL PROTECTED]> writes:

> DESCRIPTION:
>
> The following patch is related to the treatement of Criteria.isIgnoreCase() by 
>BasePeer.createQueryString()
> and BasePeer.createPreparedStatement().
>
> In the current code (before patch) the Criteria.isIgnoreCase() value ALWAYS 
>overwrite the previous values of
> the Criterions.isIgnoreCase(). So if you have a Criteria which isIgnoreCase()==false 
>and you add a Criterion
> which isIgnoreCase()==true, when the BasePeer.createQueryString() or 
>BasePeer.createPreparedStatement()
> will be executed, the Criterion.isIgnoreCase() will be false.
>
> With this patch the Criteria.isIgnoreCase() value overwrite the previous value of 
>the Criterions.isIgnoreCase()
> ONLY when Criteria.isIgnoreCase()==true.
>
>  
> Edgar Gonzalez
>
>
>
> Index: BasePeer.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/om/peer/BasePeer.java,v
> retrieving revision 1.4
> diff -u -r1.4 BasePeer.java
> --- BasePeer.java 12 Oct 2001 22:35:11 -0000 1.4
> +++ BasePeer.java 10 Jan 2002 15:21:34 -0000
> @@ -994,7 +994,7 @@
>                      table = tableName;
>                  }
>  
> -                boolean ignorCase = (criteria.isIgnoreCase() &&
> +                boolean ignorCase = ( (criteria.isIgnoreCase() || 
>someCriteria[i].isIgnoreCase()) &&
>                      (dbMap.getTable(table).getColumn(
>                      someCriteria[i].getColumn()).getType() instanceof String));
>  
> @@ -2053,7 +2053,7 @@
>                      table = tableName;
>                  }
>  
> -                boolean ignorCase = (criteria.isIgnoreCase() &&
> +                boolean ignorCase = ( (criteria.isIgnoreCase() || 
>someCriteria[i].isIgnoreCase() ) &&
>                      (dbMap.getTable(table).getColumn(
>                      someCriteria[i].getColumn()).getType() instanceof String));
>
>  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to