ibatis 索引无效
今天解决了一个ibatis索引无效的问题。
写博客记录一下,希望后来者不要再像我们一样踩坑。
报错日志主要信息如下:
Check the parameter mapping for the x property. Cause
java.sql.SQLException: 无效的列索引
原因:
我的sql语名用--注释了其中一列,如下
select a,b,
--c,
d from tablename t where t.cl=x
然后就报索引无效了。
解决方法:去掉--