Fixes gh-1486 (Related with #1237)
I've allowed to access a parameter object(value object) using any variable name on OGNL expression such as same with bind variable name.
In this change, it allow specify as follow:
public interface DemoMapper {
List<String> selectNameByCategory(Integer category);
}
<mapper namespace="...">
<select id="selectNameByCategory" resultType="string">
SELECT name FROM products
<if test="category != null">
WHERE id = #{category}
</if>
</select>
</mapper>
NOTE:
In version 3.5.0, #{category}
(in bind variable) is valid but category != null
(in OGNL expression) is invalid.
Comment From: jzdayz
ok thank you