config = factory.createConfig();
QualifiedColumn parent = new QualifiedColumn((String) parentKey.getColumNames().get(0));
QualifiedColumn child = new QualifiedColumn((String) childKey.getColumNames().get(0));
Relationship r = factory.createRelationship();
r.setName(child.getTableName());
r.setPrimaryKeyTable(parent.getTableName());
r.setForeignKeyTable(child.getTableName());
DebugUtil.debugln(getClass(), debug, "Created relationship from " + r.getPrimaryKeyTable() + " to "
+ r.getForeignKeyTable() + " named " + r.getName());
Iterator i = parentKey.getColumNames().iterator();
Iterator j = childKey.getColumNames().iterator();
while (i.hasNext() && j.hasNext()) {
parent = new QualifiedColumn((String) i.next());
child = new QualifiedColumn((String) j.next());
KeyPair pair = factory.createKeyPair();
pair.setPrimaryKeyColumn(parent.getColumnName());
pair.setForeignKeyColumn(child.getColumnName());
r.getKeyPair().add(pair);
}
r.setMany(true);
config.getRelationship().add(r);
}