dlr 02/01/25 17:34:25
Modified: src/java/org/apache/torque/util BasePeer.java
Log:
Added patch to T2 from Edgar Gonzalez <[EMAIL PROTECTED]>:
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.
Revision Changes Path
1.21 +5 -3
jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java
Index: BasePeer.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -u -r1.20 -r1.21
--- BasePeer.java 26 Dec 2001 22:12:53 -0000 1.20
+++ BasePeer.java 26 Jan 2002 01:34:25 -0000 1.21
@@ -110,7 +110,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Frank Y. Kim</a>
* @author <a href="mailto:[EMAIL PROTECTED]">John D. McNally</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Brett McLaughlin</a>
- * @version $Id: BasePeer.java,v 1.20 2001/12/26 22:12:53 jmcnally Exp $
+ * @version $Id: BasePeer.java,v 1.21 2002/01/26 01:34:25 dlr Exp $
*/
public abstract class BasePeer implements java.io.Serializable
{
@@ -1035,7 +1035,8 @@
table = tableName;
}
- boolean ignorCase = (criteria.isIgnoreCase() &&
+ boolean ignorCase = ( (criteria.isIgnoreCase() ||
+ someCriteria[i].isIgnoreCase()) &&
(dbMap.getTable(table).getColumn(
someCriteria[i].getColumn()).getType() instanceof String));
@@ -2154,7 +2155,8 @@
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]>