AmberTable mapTable = null;
ArrayList<ForeignColumn> sourceColumns = null;
ArrayList<ForeignColumn> targetColumns = null;
AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit();
if (joinTableConfig != null) {
HashMap<String, JoinColumnConfig> joinColumnsConfig = null;
HashMap<String, JoinColumnConfig> inverseJoinColumnsConfig = null;
if (! joinTableConfig.getName().equals(""))
sqlTable = joinTableConfig.getName();
joinColumnsConfig = joinTableConfig.getJoinColumnMap();
inverseJoinColumnsConfig = joinTableConfig.getInverseJoinColumnMap();
mapTable = persistenceUnit.createTable(sqlTable);
sourceColumns
= calculateColumns(_field, _fieldName, mapTable,
_sourceType.getTable().getName() + "_",
_sourceType,
joinColumnsConfig);
targetColumns = calculateColumns(_field, _fieldName, mapTable,
targetType.getTable().getName() + "_",
targetType,
inverseJoinColumnsConfig);
}
else {
mapTable = persistenceUnit.createTable(sqlTable);
sourceColumns = calculateColumns(mapTable,
_sourceType.getTable().getName() + "_",
_sourceType);