ibatis - Exception with rownum in mybatis -


following sql query used in mybatis mapper xml.

<select id="getdata"   fetchsize="30" resulttype="java.util.hashmap" >             select * table             module='ab'             , rownum < 15 </select> 

i getting below exception while using rownum :

 error parsing sql mapper configuration. cause: org.apache.ibatis.builder.builderexception: error creating document instance.  cause: org.xml.sax.saxparseexception; linenumber: 130; columnnumber: 16; content of elements must consist of well-formed character data or markup. 

below things have tried:

rownum&lt;=15  , <![cdata[ rownum <= 15 ]]> 

but still not working.

try this:

<select id="getdata" fetchsize="30" resulttype="java.util.hashmap" >             select * table             module='ab'             <![cdata[ , rownum <= 15 ]]> </select> 

or rownum &lt;= 15 (with whitespaces after rownum , before 15).


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -