Java 我正在使用 ibatis
使用 in 子句想要在 in 子句中迭代,每个人都在谈论以下解决方案,但是当我尝试时它给了我以下错误。
**Cause: com.ibatis.common.beans.ProbeException: There is no READABLE property named '[]' in class 'java.util.List'**
List entityIds = new ArrayList(2);
entityIds.add(42167777);
entityIds.add(43178455);
(List<EventCategory>)sqlMapClient.queryForList("getEventCategoryByEntityIds", entityIds);
<select id="getEventCategoryByEntityIds" parameterClass="java.util.List" resultMap="eventCategoryDetails">
<![CDATA[
SELECT E.EVENTCATEGORYID, ECAT.Name EVENTCATEGORYNAME, E.EVENTSUBCATEGORYID , ESUBCAT.Name EVENTSUBCATEGORYNAME FROM
Event E (nolock)
JOIN EVENTCATEGORY ECAT (nolock) ON E.EventCategoryId=ECAT.EventCategoryId JOIN EVENTCATEGORY ESUBCAT ON E.EVENTSUBCATEGORYID=ESUBCAT.EventCategoryId
<dynamic prepend="where ENTITYID in ">
<iterate open="(" close=")" conjunction=",">
#[]#
</iterate>
</dynamic>
]]>
</select>
我生病了,并尝试尝试此解决方案,但没有奏效。任何帮助表示赞赏..