PrimaryKeyJoinColumnConfig pkJoinColumnCfg)
throws ConfigException
{
ArrayList<ForeignColumn> linkColumns = new ArrayList<ForeignColumn>();
for (AmberColumn column : primaryTable.getIdColumns()) {
ForeignColumn linkColumn;
String name;
if (joinColumnsAnn == null) {
if (pkJoinColumnCfg == null)
name = column.getName();
else
name = pkJoinColumnCfg.getName();
}
else {
PrimaryKeyJoinColumn join;
join = getJoinColumn(joinColumnsAnn, column.getName());
if (join == null)
name = column.getName();
else
name = join.name();
}
linkColumn = secondaryTable.createForeignColumn(name, column);
linkColumn.setPrimaryKey(true);
secondaryTable.addIdColumn(linkColumn);
linkColumns.add(linkColumn);
}