EJB-QL does not allow the use of >, <, >= and <= for all field types. What is the type of the field?
since ejb-jar is an xml file, certain characters need to be escaped. otherwise, there will be parsing errors. the ones i know about are <, >, &, ' and ".
for large sections of xml that need to be escaped, there is a tag called "CDATA"
here is an example from dain sundstrom's JBossCMP document on cmp:
FROM gangster g
WHERE g.badness > ?1
so, surround your query with <![CDATA[ ....... ]]>
i haven't used this yet, so good luck.
Ahhh...perhaps that is the problem. This is a java.lang.String java type. I will try it out and post back the results.
FYI: the CDATA tag works just fine, but does not solve the problem.
Looks like changing the field over to a int allowed the query to parse.
If any developers are watching I suggest a modification to not restrict this for String types. There are valid scenarios for greater than and less than String queries such as name comparison.
What valid scenarios? This seems like a very database specific feature (i.e., it will have different results on different databases).