foreignKey.setParent(table);
foreignKey.setColumns(new ArrayList<Column>(columnNames.size()));
foreignKey.setName(name);
setUUID(foreignKey);
if (pkTable.getPrimaryKey() == null) {
throw new TranslatorException("No primary key defined for table " + pkTable); //$NON-NLS-1$
}
foreignKey.setPrimaryKey(pkTable.getPrimaryKey());
foreignKey.setUniqueKeyID(pkTable.getPrimaryKey().getUUID());
assignColumns(columnNames, table, foreignKey);
table.getForeignKeys().add(foreignKey);