AbstractTable refTable = (AbstractTable)storeMgr.getDatastoreClass(idFactory.newDatastoreContainerIdentifier(fki.pkTableName));
if (refTable != null)
{
DatastoreIdentifier colName = idFactory.newIdentifier(IdentifierFactory.COLUMN, fki.fkColumnName);
DatastoreIdentifier refColName = idFactory.newIdentifier(IdentifierFactory.COLUMN, fki.pkColumnName);
DatastoreField col = (DatastoreField) columnsByName.get(colName);
DatastoreField refCol = (DatastoreField) refTable.columnsByName.get(refColName);
if (col != null && refCol != null)
{
fk.addDatastoreField(col, refCol);