// first phase is to create fk fields
Map pkFieldsToFKFields = new HashMap(tableKeys.size());
for(Iterator i = tableKeys.iterator(); i.hasNext();)
{
JDBCCMPFieldMetaData cmpFieldMetaData = (JDBCCMPFieldMetaData)i.next();
FieldBridge pkField = entity.getFieldByName(cmpFieldMetaData.getFieldName());
if(pkField == null)
{
throw new DeploymentException("Primary key not found for key-field " + cmpFieldMetaData.getFieldName());
}
pkFieldsToFKFields.put(pkField, new JDBCCMPFieldBridge2(manager, entity, cmpFieldMetaData, -1));