xml
<select id="getPagePrototypeStorage" resultClass="prototypeStorage" parameterClass="prototypeStorage">
SELECT * FROM tb_prototype_storage where 1=1
</sql>
java代码
sqlMapClient.queryForList("getPagePrototypeStorage",prototypeStorage);以前用mysql能正常查询和分页,现在换成oracle后,提示:SQLSyntaxErrorException: ORA-00933: SQL 命令未正确结束打印sql一看发现sql后面自动加上了 limit ?,?,可是我现在已经换成了oracle,如何才能让ibatis自动识别数据库呢?
<select id="getPagePrototypeStorage" resultClass="prototypeStorage" parameterClass="prototypeStorage">
SELECT * FROM tb_prototype_storage where 1=1
</sql>
java代码
sqlMapClient.queryForList("getPagePrototypeStorage",prototypeStorage);以前用mysql能正常查询和分页,现在换成oracle后,提示:SQLSyntaxErrorException: ORA-00933: SQL 命令未正确结束打印sql一看发现sql后面自动加上了 limit ?,?,可是我现在已经换成了oracle,如何才能让ibatis自动识别数据库呢?
SELECT * FROM tb_prototype_storage where 1=1
</sql>
结束标志怎么事</sql>,应该是</select>吧
这是我打错了,实际中没有这问题,主要问的是我换了oracle数据库后他还自动在sql后面加limit这个问题怎么解决?
另外 既然用了ibatis 为什么还有这种 where 1=1 拼sql时代留下的丑陋东东?
扯淡呢,你开发的?有这么好早就淘汰Hibernate了。