Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,21 @@ public List<Field> getNonPkFields() {
}
return retVal;
}


/**
* Returns non-primary and not virtual key fields
* @return The list of non-primary key and not virtual key fields
*/
public List<Field> getNonPkAndNotVirtualFields() {
List<Field> retVal = new ArrayList<>();
for (Field fd : this.fieldList) {
if (!fd.isPrimaryKey() && !fd.isVirtual()) {
retVal.add(fd);
}
}
return retVal;
}

/**
* Returns the standalone primary key field of this table. If there is no primary key field in this table, it returns null.
* @return The standalone primary key field of this table or null if there is no primary key field in this table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,8 @@ public class ${t.javaName}${e.daoSuffix}Impl implements ${t.javaName}${e.daoSuff
String sql = "update ${t.dbName} " +
"set " +
<#assign fieldList>
<#list t.nonPkFields as field>
<#if !field.virtual>
<#list t.nonPkAndNotVirtualFields as field>
<#if field.blob||field.clob>(updateLobFields?"${field.dbName} = ? <#if field_has_next>, </#if>":"") +<#else> "${field.dbName} = ? <#if field_has_next>, </#if>" +</#if>
</#if>
</#list>
</#assign>
${fieldList?remove_ending(", ")}
Expand Down