Mybatis3.2.8 使用
来源:互联网 发布:淘宝会员id在哪里查看 编辑:程序博客网 时间:2024/06/07 04:06
1.mybatis 默认支持的(typeAlias )别名
别名 映射的类型_byte ------ byte_long ------ long_short ------ short_int ------ int_integer ------ int_double ------ double_float ------ float_boolean ------ booleanstring ------ Stringbyte ------ Bytelong ------ Longshort ------ Shortint ------ Integerinteger ------ Integerdouble ------ Doublefloat ------ Floatboolean ------ Booleandate ------ Datedecimal ------ BigDecimalbigdecimal ------ BigDecimalobject ------ Objectmap ------ Maphashmap ------ HashMaplist ------ Listarraylist ------ ArrayListcollection ------ Collectioniterator ------ Iterator
2.insertOrUpdate(插入或者更新)
<insert id="insertOrUpdateRestaurant" parameterType="URestaurant"> <selectKey keyProperty="count" resultType="int" order="BEFORE"> select count(*) from u_restaurant where USER_ID = #{userId} </selectKey> <if test="count > 0"> <include refid="update_inclue"></include> </if> <if test="count==0"> <include refid="insert_inclue"></include> </if> </insert>
3.官方参考文档
http://www.mybatis.org/mybatis-3/zh/configuration.html#typeAliases
阅读全文
0 0
- Mybatis3.2.8 使用
- mybatis3.0的使用
- mybatis3使用经验
- mybatis3 使用注意事项
- mybatis3 使用注意事项
- mybatis分页插件使用(spring4.1.4结合mybatis3.2.8)
- Mybatis3简单使用(PostgreSQL)
- Mybatis3
- 使用Mybatis3的拦截器进行分页
- Mybatis3.2使用心得 中文API
- mybatis3中@SelectProvider的使用技巧
- mybatis3中@SelectProvider的使用技巧
- mybatis3中注解方式使用mapper
- mybatis3中@SelectProvider的使用技巧
- mybatis3中@SelectProvider的使用技巧
- mybatis3中@SelectProvider的使用技巧
- mybatis3中@SelectProvider的使用技巧
- mybatis3中@SelectProvider的使用技巧
- 分割问题中“类间竞争”是怎么回事
- [算法分析与设计] leetcode 每周一题: Minimum Time Difference
- DevexpressGridControl禁止点击单元格修改
- Reinforcement Learning_By David Silver笔记五: Model Free Control
- Android6.0运行时权限解析,RxPermissions的使用,自己封装一套权限框架
- Mybatis3.2.8 使用
- 【知了堂学习笔记】_Java中cookie的学习
- MySQL InnoDB锁机制之Gap Lock、Next-Key Lock、Record Lock解析
- Mybatis高级映射(一对一的查询以及一对多)
- HTTP 2.0 协议详解
- VB控件随窗体最大化变化的方法
- Source Insight函数调用关系显示设置
- 简单的select美化
- 正则表达式——帮助