
mybatis
春风霓裳
加油(ง •̀_•́)ง
展开
-
mybatisplus-分页插件PageHelper
参考:https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/Important.mdhttps://gitee.com/free/Mybatis_PageHelper#mybatis-%E5%88%86%E9%A1%B5%E6%8F%92%E4%BB%B6—pagehelper原创 2023-09-13 16:59:47 · 501 阅读 · 0 评论 -
mybatis整体理解
官方文档:https://mybatis.net.cn/configuration.html#plugins原创 2023-08-28 15:11:33 · 76 阅读 · 0 评论 -
MybatisPlus查询条件为空字符串或null问题及解决
时,当前这个条件方法不会生效,即生成的sql不会拼接这个条件;所以在这个参数里判断查询参数是否为空即可。condition是一个布尔值,当condition为false。原创 2023-07-25 14:27:20 · 1454 阅读 · 0 评论 -
mybatis sql in语法是试例
java原创 2023-05-08 09:53:28 · 85 阅读 · 0 评论 -
springdataJPA的使用
jpa原创 2023-01-08 12:23:19 · 795 阅读 · 0 评论 -
springdata-jpa配置
springdata-jpa原创 2023-01-07 13:57:11 · 284 阅读 · 0 评论 -
mybatis中distinct和order by 的用法(同时使用)
1:帖一段sql在mybatis的代码select distinct student_id from t_student order by creat_time desc这段代码在数据库中是不会报错的,但是你开启服务后会报xml错误。解决办法是,order by的字段要在distinct中存在 即:select distinct student_id ,creat_time from t_student order by creat_time desc......原创 2022-05-04 17:18:57 · 1830 阅读 · 1 评论 -
mybatis常见问题
1、mybatis映射文件中不能使用"<""&"问题在 XML 中有 5 个预定义的实体引用:< < 小于> > 大于& & 和号' ' 省略号" " 引号2、当字段为数字类型时,不能在标签中用不能等于空字符串<if test="del != null原创 2022-03-29 16:56:29 · 488 阅读 · 0 评论 -
MyBatis之java.lang.UnsupportedOperationException
参考:https://blog.youkuaiyun.com/sunshinezx8023/article/details/78403011在使用MyBatis执行sql语句时,出现如下异常:java.lang.UnsupportedOperationExceptionsql语句如下: 注意:这里的resultType= “Java.util.List”<select id="getStudentScore" parameterType="String" resultType="java.util.Li原创 2022-03-14 22:12:52 · 1314 阅读 · 0 评论 -
mybatis的sqlSession的使用
SqlSession用于操作mybatis底层的类:可以实现对一个数组按数量提交存储:commit也可以有回滚操作:SqlSession类结构:eg:SqlSession sqlSession = sqlSessionTemplate.getSqlSessionFactory().openSession(ExecutorType.BATCH, false); PropagandaCabinetMapper mapper = sqlSession.getMapper(Pro原创 2021-07-01 16:52:07 · 2560 阅读 · 0 评论 -
mybatis一对多--多对多(查出的数据-返回参数)
xml文件为:<!--1对多,指的是在那个多的里面都是不同的(collection),而在resultMap上的result都是一样的--> <resultMap id="resultAllDTO" type="cn.org.emcs.materialapi.social.dto.DonationMeterialAllDTO"><!-- <id property="ids" column="ids"/>--> <原创 2021-05-31 16:30:33 · 504 阅读 · 0 评论 -
mybatis--数据流入(根据接收参数拼接sql)--(choose、otherwise)、foreach、if实现dao的逻辑
mybatis原创 2022-06-29 16:13:18 · 270 阅读 · 0 评论