diff --git a/src/main/resources/templates/vm/xml/Mapper.xml.vm b/src/main/resources/templates/vm/xml/Mapper.xml.vm
index fa8a855b..60ba37dd 100644
--- a/src/main/resources/templates/vm/xml/Mapper.xml.vm
+++ b/src/main/resources/templates/vm/xml/Mapper.xml.vm
@@ -45,16 +45,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- update ${tableName}
-
-#foreach($column in $columns)
-#if($column.columnName != $primaryKey.columnName)
- $column.columnName = #{$column.attrname}#if($velocityCount != $columns.size()), #end
-#end
-#end
-
- where ${primaryKey.columnName} = #{${primaryKey.attrname}}
+ update ${tableName}
+
+ #foreach($column in $columns)
+ #if($column.columnName != $primaryKey.columnName)
+
+ $column.columnName = #{$column.attrname},
+
+ #end
+ #end
+
+ where ${primaryKey.columnName} = #{${primaryKey.attrname}}
+
+
delete from ${tableName} where ${primaryKey.columnName} = #{${primaryKey.attrname}}