Mybatis动态SQL单一基础类型参数用if标签
2014-09-24 14:02
381 查看
Mybatis动态SQL单一基础类型参数用if标签时,test中应该用 _parameter,如:
<select id="selectByName" resultMap="ResultMap" parameterType="java.lang.String" >
select * from table1
<if test="_parameter != null">
where _name = #{name}
</if>
</select>
<select id="selectByName" resultMap="ResultMap" parameterType="java.lang.String" >
select * from table1
<if test="_parameter != null">
where _name = #{name}
</if>
</select>
相关文章推荐
- Mybatis动态SQL单一基础类型参数用if标签
- Mybatis动态SQL单一基础类型参数用if标签注意事项
- MyBatis动态SQL之一使用 if 标签和 choose标签
- MyBatis--动态SQL---if标签
- MyBatis动态SQL中trim标签的使用参数
- mybatis中动态sql标签之if trim
- mybatis的if标签对于单个基本数据类型的参数的判断问题
- MyBatis代码实例系列-06:Mybatis动态SQL标签(一)---if、where、set、trim、choose
- MyBatis动态SQL之一使用 if 标签和 choose标签
- Mybatis动态SQL-if标签
- Mybatis 动态加载sql when otherwise choose 理解成if else 条件中可以把传来的参数当变量
- mybatis的动态SQL(一)if标签的使用
- Mybatis基础---常用SQL映射标签、多参数设置、resultMap(自定义映射)
- mybatis入门基础(五)----动态SQL
- mybatis入门基础(五)----动态SQL
- mybatis 使用String 与其他基本类型时 动态sql 注意的地方
- MyBatis教程之分页和动态SQL语句基础
- Mybatis学习(十一)mybatis动态sql传入pojo的包装类型
- mybatis入门基础(五)----动态SQL
- MyBatis动态SQL中trim标签的运用