for (int i = 0; i < cols.length; i++) {
Row row = rm.getRow(cols[i].getTable(), Row.ACTION_UPDATE, sm,
true);
row.setFailedObject(sm.getManagedInstance());
if (curVersion != null && sm.isVersionCheckRequired()) {
row.whereObject(cols[i], getColumnValue(curVersion, i));
if (isSecondaryColumn(cols[i], sm)) {
ForeignKey[] fks = cols[i].getTable().getForeignKeys();
for (ForeignKey fk : fks) {
row.whereForeignKey(fk, sm);
}