前言
为什么说是一个坑呢?是因为这个错误实在是比较难出现,只有在特定的场合才会出现,是关于Mybatis语法错误的一个问题,说到底,其实就是一个小逗号的事情。
问题描述
先来看一段sql:
<update id="updateByPrimaryKeySelective" parameterType="com.weimob.mengdian.promotion.dao.model.PromotionInfo">
update promotion_info set
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>