在SqlMap中有isNotEmpty这个属性,来判断条件是否为空我想问在SqlMap中有没有判断条件值的属性?比如:select * from table where name=?
<isNotEmpty property="gendex">
and gendexn=#gendex# 
</isNotEmpty>
<条件:if name=a>
and time>=?
</条件>
<条件:if name=b>
and time>=?
</条件>这样的写法啊?

解决方案 »

  1.   

    MYBATIS <if test="XX != null"> 有这种标签
    ibatis 也有 IF 标签
      

  2.   

    百度到了,谢谢大家,分享下:iBATIS动态查询几个常用属性  ﹤ isPropertyAvailable ﹥  属性是存在  ﹤ isNotPropertyAvailable ﹥  属性不存在  ﹤ isNull ﹥  属性值是null  ﹤ isEmpty ﹥  判断Collection.size ﹤ 1 或String.length()﹤1  ﹤isEqual ﹥  等于  ﹤ isNotEqual ﹥  不等于  ﹤ isGreaterThan ﹥  大于  ﹤ isGreaterEqual ﹥  大于等于  ﹤ isLessThan ﹥  小于  ﹤ isLessEqual ﹥  小于等于地址:http://progress.iteye.com/blog/436786