// don't insert or update with the given fk; create a deferred
// update for after the rel row has been inserted; use a primary row
// to prevent setting values until after flush to get auto-inc
update = new PrimaryRow(row.getTable(), Row.ACTION_UPDATE, null);
if (row.getAction() == Row.ACTION_INSERT)
update.wherePrimaryKey(row.getPrimaryKey());
else
row.copyInto(update, true);
update.setForeignKey(fks[i], row.getForeignKeyIO(fks[i]), sm);
row.clearForeignKey(fks[i]);