Let's say in my sql statement I want to do:
WHERE numberOfCookies >= 10
How do I do this in iBatis?
Let's say in my sql statement I want to do:
WHERE numberOfCookies >= 10
How do I do this in iBatis?
Is this what you want?
<isGreaterEqual prepend="AND"
property="numberOfCookies"
compareValue="10">
BIGFOOT = ‘TRUE'
</isGreaterEqual>
See Dynamic SQL at ibatis.apache.org.
Because the SQL is written in xml, you cannot just use the symbol ">", you need to write it as:
WHERE numberOfCookies <= 10
Why does it not work?
The only thing I can think of is that the >
character isn't playing nice with the XML. In which case, you can wrap the entire statement within <![CDATA[ ... ]]>