Mybatis sql map 小于号配置

时间:2014-03-03 01:33:33   收藏:0   阅读:980

Mybatis SQL map配置中出现小于号转义时,通过<![CDATA[查询条件]]>解决。

 

EXCEMPLE:

<select id="getComments" parameterType="Pagination" resultType="CustomerComments">
  SELECT * FROM kk_customercomments
  <if test="condition != null">
    WHERE true
      <if test="condition.enddate != null">
        and <![CDATA[COMMENTSDATE <= ‘${condition.enddate}‘]]>
      </if>
  </if>
</select>

Mybatis sql map 小于号配置,布布扣,bubuko.com

原文:http://www.cnblogs.com/dylanw/p/3576175.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!