随笔分类 -  mybatis相关

摘要:一、mapper接口中的方法解析 mapper接口中的函数及方法: 二、example实例解析 mybatis的逆向工程中会生成实例及实例对应的example,example用于添加条件,相当where后面的部分 xxxExample example = new xxxExample(); Crit 阅读全文
posted @ 2018-10-08 15:43 晨子语 阅读(1313) 评论(0) 推荐(0) 编辑
摘要:传入的是对象集合 阅读全文
posted @ 2018-08-10 15:42 晨子语 阅读(180) 评论(0) 推荐(0) 编辑
摘要:完整错误如下: org.apache.ibatis.binding.BindingException: Parameter ‘customerIdList’ not found. Available parameters are [collection, list] 解释: 当我们传递一个 List 阅读全文
posted @ 2018-08-10 15:37 晨子语 阅读(32371) 评论(0) 推荐(5) 编辑
摘要:1.根据useGeneratedKeys获取返回值,部分数据库不支持 修改mybatis xml useGeneratedKeys="true" :设置是否使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型属性中。(适用于mysql、sqlser 阅读全文
posted @ 2018-08-10 14:25 晨子语 阅读(33901) 评论(2) 推荐(1) 编辑