Update of /var/cvs/src/org/mmbase/bridge/util
In directory james.mmbase.org:/tmp/cvs-serv18749/src/org/mmbase/bridge/util
Modified Files:
Tag: MMBase-1_8
Queries.java
Log Message:
prevent casting values to Date in a constraint if the value asked is a date part
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/bridge/util
Index: Queries.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/bridge/util/Queries.java,v
retrieving revision 1.77.2.13
retrieving revision 1.77.2.14
diff -u -b -r1.77.2.13 -r1.77.2.14
--- Queries.java 16 Sep 2008 11:19:26 -0000 1.77.2.13
+++ Queries.java 18 Feb 2009 09:58:19 -0000 1.77.2.14
@@ -29,7 +29,7 @@
* methods are put here.
*
* @author Michiel Meeuwissen
- * @version $Id: Queries.java,v 1.77.2.13 2008/09/16 11:19:26 michiel Exp $
+ * @version $Id: Queries.java,v 1.77.2.14 2009/02/18 09:58:19 pierre Exp $
* @see org.mmbase.bridge.Query
* @since MMBase-1.7
*/
@@ -475,9 +475,8 @@
// XML's are treated as String in the query-handler so,
let's anticipate that here...
// a bit of a hack, perhaps we need something like a
'searchCast' or so.
value = Casting.toString(value);
- } else {
+ } else if (datePart == -1) {
value = field.getDataType().cast(value, null, field);
-
}
}
Object compareValue = getCompareValue(fieldType, operator, value,
datePart, cloud);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs