JDBCAbstractCMRFieldBridge cmrField = cmrFields[i];
JDBCRelationMetaData relationMetaData = cmrField.getMetaData().getRelationMetaData();
DataSource dataSource = manager.getDataSource(relationMetaData.getDataSourceName());
// if the table for the related entity has been created
final EntityBridge relatedEntity = cmrField.getRelatedEntity();
if (relationMetaData.isTableMappingStyle() && manager.hasCreateTable(relatedEntity.getEntityName())) {
boolean relTableExisted = SQLUtil.tableExists(cmrField.getQualifiedTableName(), entity.getDataSource());
if (relTableExisted) {
if (relationMetaData.getAlterTable()) {
ArrayList oldNames = SQLUtil.getOldColumns(cmrField.getQualifiedTableName(), dataSource).getColumnNames();
ArrayList newNames = new ArrayList();