读书人

Mybatis3更新和剔除语句映射

发布时间: 2012-08-09 15:59:21 作者: rapoo

Mybatis3更新和删除语句映射

更新删除相对简单点,只要属性和类型对应即可。

?

模板

?

<update id="updateAuthor" parameterType="domain.blog.Author">update Author setusername = #{username},password = #{password},email = #{email},bio = #{bio}where id = #{id}     </update><delete id="deleteAuthor” parameterType=" int ">delete from Author where id = #{id}     </delete>

?

其属性值

?

?

<update  id="insertAuthor"  parameterType="domain.blog.Author"  flushCache="true"  statementType="PREPARED"  timeout="20000"> <delete  id="insertAuthor"  parameterType="domain.blog.Author"  flushCache="true"  statementType="PREPARED"  timeout="20000"> 

读书人网 >其他数据库

热点推荐