ChangeSummary summary = changedObject.getDataGraph().getChangeSummary();
Iterator i = getChangedFields(mapping, summary, changedObject).iterator();
while (i.hasNext()) {
Property property = (Property) i.next();
Column c = t.getColumnByPropertyName(property.getName());
if ((c != null) && (c.isCollision() || c.isPrimaryKey())) {
// get rid of comma if OCC or PK is last field
if (!i.hasNext()) {
statement.delete(statement.length() - 2, statement.length());
}
} else {
updatedProperties.add(property);
statement.append(c == null ? property.getName() : c.getColumnName());
statement.append(" = ?");
if (i.hasNext()) {
statement.append(", ");
}
}
}
Column c = t.getManagedColumn();
if (c != null) {
statement.append(", ");
statement.append(c.getColumnName());
statement.append(" = ?");
managedProperties.add(changedObject.getProperty(t.getManagedColumnPropertyName()));
}
statement.append(" where ");