【发布时间】:2017-11-30 17:45:43
【问题描述】:
Java Mybatis Oracle
我在 xml 文件中有以下 mybatis 语句
<update id="updateOfferIndex" parameterType="java.util.List">
<foreach collection="list" item="offer" index="index" separator=";" >
UPDATE offer set indx=#{offer.idx} WHERE id=#{offer.eId}
</foreach>
我遇到以下错误,谁能帮忙?
### Error updating database. Cause: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
### The error may involve com.dao.linear.upsell.LinearUpsellDao.updateOfferIndex-Inline
### The error occurred while setting parameters
### SQL: UPDATE offer set indx=? WHERE id=? ; UPDATE offer set indx=? WHERE id=?
### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
【问题讨论】:
-
这个调用在 java 中是什么样子的?我认为不可能一次执行调用多个语句。
-
upsellDao.updateOfferIndex(offers);