diff --git a/src/main/resources/templates/vm/xml/Mapper.xml.vm b/src/main/resources/templates/vm/xml/Mapper.xml.vm index f82e7cbc3..c8a6d0be6 100644 --- a/src/main/resources/templates/vm/xml/Mapper.xml.vm +++ b/src/main/resources/templates/vm/xml/Mapper.xml.vm @@ -49,19 +49,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update ${tableName} - #foreach($column in $columns) - #if($column.columnName != $primaryKey.columnName) - - $column.columnName = #{$column.attrname}, - - #end - #end +#foreach($column in $columns) +#if($column.columnName != $primaryKey.columnName) + $column.columnName = #{$column.attrname}, +#end +#end - where ${primaryKey.columnName} = #{${primaryKey.attrname}} + where ${primaryKey.columnName} = #{${primaryKey.attrname}} - - delete from ${tableName} where ${primaryKey.columnName} = #{${primaryKey.attrname}}