用法
<isNotNull property="videoIdList" prepend="and">
<![CDATA[ video_id IN ]]>
<iterate property="videoIdList" open="(" close=")" conjunction=",">
<![CDATA[ #videoIdList[]# ]]>
</iterate>
</isNotNull>
<iterate property="videoIdList">
不加 property会报如下异常信息
“org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
— The error occurred in appName/sql-material.xml.
— The error occurred while preparing the mapped statement for execution.
— Check the material.list.
— Check the parameter map.
— Cause: com.ibatis.sqlmap.client.SqlMapException: ParameterObject or property was not a Collection, Array or Iterator.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
— The error occurred in appName/sql-material.xml.
— The error occurred while preparing the mapped statement for execution.
— Check the material.list.
— Check the parameter map.
— Cause: com.ibatis.sqlmap.client.SqlMapException: ParameterObject or property was not a Collection, Array or Iterator.”