SELECT DET_NAME FROM TYPE_DEATAIL
DET_TYPE_ID=#detTypeId[]#
public List getByTypeIDs(int detTypeId[])throws SQLException{
return sqlMapper.queryForList("getByTypeIDs",detTypeId);
}
2008-08-08 14:55:40,937 DEBUG [java.sql.Connection] - {conn-100000} Connection
2008-08-08 14:55:40,937 DEBUG [com.ibatis.common.jdbc.SimpleDataSource] - Returned connection 1623405 to pool.
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:156)
... 7 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.ibatis.common.beans.BaseProbe.getIndexedProperty(BaseProbe.java:50)
... 15 more
使用的是默认参数 记不太清怎么用了
用
[code="java"]
SELECT DET_NAME FROM TYPE_DEATAIL
DET_TYPE_ID=#value[]#
[/code]
或
[code="java"]
SELECT DET_NAME FROM TYPE_DEATAIL
DET_TYPE_ID=#value[]#
[/code]
试试
你的detTypeId 肯定是传了一个空进去, 或者是空的数组进去.
你要先判断是 isNotNull, 再判断isNotEmpty, 再使用iterator