This commit is contained in:
地平线
2015-06-04 11:04:32 +08:00
parent 01e1a67616
commit fe3bdb7979

View File

@@ -833,9 +833,9 @@ public final class DataJDBCSource implements DataSource {
final Serializable id = info.getPrimary().get(value);
final List<Attribute<T, Serializable>> attrs = new ArrayList<>();
for (String col : columns) {
if (setsql.length() > 0) setsql.append(',');
Attribute<T, Serializable> attr = info.getUpdateAttribute(col);
if (attr == null) continue;
if (setsql.length() > 0) setsql.append(',');
setsql.append(info.getSQLColumn(col)).append(" = ").append(formatToString(attr.get(value)));
}
String sql = "UPDATE " + info.getTable() + " SET " + setsql