The filter system is typeless; in interpreting the filters we cheat :-) So when you do a less then comparison against an attribute we know is a Double; we do our best to do the comparison as a number; rather then as a string.
Try using the FilterFactory directly if you want more control over what is produced; I like it because it keeps me from having typos. Jody On 06/05/2010, at 12:09 AM, Thorsten Reitz wrote: > Hi all, > > this time I have a question related to the usage of CQLK filter > constructs. I have noticed that when using a simple filter like > "Attribute < 5", the compareTo method of String is used. This will also > evaluate numbers like 10, 100, or 1000 to evaluate to true in the > IsLessThanImpl filter. > > The constructed IsLessThanImpl filter actually looks correct in the > debugger, using a Long binding for the literal value. The binding for > the attribute against which I filter is also Long, so I do not > understand what goes wrong. > > Any ideas? > > Kind regards, > > Thorsten > > -- > Thorsten Reitz > > Fraunhofer-Institut für Graphische Datenverarbeitung IGD > Fraunhoferstr. 5 | 64283 Darmstadt | Germany > [email protected] | www.igd.fraunhofer.de > > ------------------------------------------------------------------------------ > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
