
Mybatis
Orient_
人生苦短我学Java
展开
-
mybatis批量插入报 ORA-01461-仅能绑定要插入LONG列的LONG值
一,Mybatis Oracle实现批量插入<insert id="insertUserBatch" parameterType="java.util.List"> INSERT INTO table_user ( id, user_code, user_name ) <foreach collection="userList" item="item" index="index" separator="UNION ALL原创 2020-07-29 11:34:21 · 1811 阅读 · 1 评论 -
Mybatis中解决Oracle11g 不能在同一行执行多条命令问题(报错ora-00911)
在Mybatis实现批量更行操作时,<foreach>标签实现,实质就是将多条sql拼接后让数据库执行,然后Oracle11g是不支持在同行执行多条命令的。所以要做特殊处理。一,未处理代码<update id="saveNos" parameterType="java.util.List"> <foreach collection="list" item="item" index="index" separator=";" open="...原创 2020-05-14 18:41:10 · 607 阅读 · 0 评论 -
Mybatis Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符在mybatis开发中报此错误,但是将sql粘贴到plsql中执行时没有任何的错误原因:mybatis mapper文件中sql语句结尾不用加";",否则会报错原创 2020-05-14 11:36:38 · 351 阅读 · 0 评论 -
Mybatis报java.lang.UnsupportedOperationException异常
java.lang.UnsupportedOperationException异常接口:List<String> findRobotNameById(@Param("robotIds") List<String> robotIds);<select id="findRobotNameById" resultType="java.util.List"> select ROBOT_NAME from PRO_ROBOTS where ROBO原创 2020-05-12 16:07:30 · 354 阅读 · 0 评论 -
Mybatis使用插件Mybatis-PageHelper进行翻页(SpringMVC+Spring+Mybatis-PageHelper)
使用SpringMVC+Spring+Mybatis-PageHelper实现翻页功能一.翻页功能实现的简单工具类以及插件整合准备Page类public class Page<E> { //当前页 private int pageNum; //每页显示条数 private int pageSize; //总页数 private int totalPage; //总记录 ...原创 2018-06-14 16:18:03 · 515 阅读 · 0 评论