首页 > 其他 > 详细

mybatis之The expression 'oredCriteria' evaluated to a null value的解决方法

时间:2014-09-16 18:42:00      阅读:6613      评论:0      收藏:0      [点我收藏+]
<if test="example!= null">
      <include refid="Example_Where_Clause" />
</if>
原因:执行过程中,显示在使用example的时候,里面的criteria为null;将上面的XML用下面替换
<if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
</if>

例子:

<select id="selectByExampleLimit" resultMap="BaseResultMap">
        select
        <if test="distinct">
            distinct
        </if>
        <include refid="Base_Column_List" />
        from Test
        <if test="_parameter != null" >
            <include refid="Update_By_Example_Where_Clause" />
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
</select>

 

mybatis之The expression 'oredCriteria' evaluated to a null value的解决方法

原文:http://www.cnblogs.com/spacewalk/p/3975415.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!