这是接口里的方法:public List<BlogrollEntity> selectByTitle(String bTitle);
这是上面方法对应的sql:
<select id="selectByTitle" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from blogroll
where b_title = #{bTitle,jdbcType=VARCHAR}
</select>
为什么第五行要加jdbcType=VARCHAR?
还有映射文件里下面这段为什么都要加jdbcType=****?
<resultMap id="BaseResultMap" type="com.portalManager.web.model.Entity.BlogrollEntity">
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="b_title" property="bTitle" jdbcType="VARCHAR" />
<result column="b_url" property="bUrl" jdbcType="VARCHAR" />
<result column="b_details" property="bDetails" jdbcType="VARCHAR" />
<result column="b_create_time" property="bCreateTime" jdbcType="VARCHAR" />
<result column="b_is_deleted" property="bIsDeleted" jdbcType="BIGINT" />
<result column="b_web_code" property="bWebCode" jdbcType="VARCHAR" />
</resultMap>
慕粉3233872
相关分类