我們更新了幾行,在更新行後,我們希望返回受影響的行數。我們如下MyBatis/Ibatis錯誤:元素類型「update」的內容必須匹配
<update id="update" parameterClass="com.test.Delete">
update entity_association set deleted = 1, syncTS = #syncTS# where
assoc_entity_row_id in
<iterate property="parentIds" open="(" close=")" conjunction=",">
#parentIds[]#
</iterate>
and assoc_entity_type = #parentType#;
<selectKey resultClass="int">
select row_count()
</selectKey>
</update>
回訪影響計數,當我們添加標籤selectKey元素,我們得到錯誤"The content of element type "update" must match "(include|dynamic|iterate|isParameterPresent|isNotParameterPresent|isEmpty|isNotEmpty|isNotNull|isNull|isNotEqual|isEqual| isGreaterThan|isGreaterEqual|isLessThan|isLessEqual|isPropertyAvailable|isNotPropertyAvailable)"
行的數量來寫我們的XML文件。
有沒有更好的實現方法? selectKey標籤對插入工作正常。
它看起來像標記可能不包含標記。檢查myBatis/iBatis文檔;我認爲更新已經返回更新的行數。 –
DwB
2014-10-30 14:55:06