211212213214215216217218219220221
CollectionTableConfig collectionTableConfig = _collectionTable; AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit(); String sqlTable = collectionTableConfig.getName(); AmberTable mapTable = persistenceUnit.createTable(sqlTable); HashMap<String, JoinColumnConfig> joinColumnsConfig = collectionTableConfig.getJoinColumnMap(); ArrayList<ForeignColumn> sourceColumns = null;
262263264265266267268269270271272
if (! joinTableName.equals("")) sqlTable = joinTableName; } mapTable = persistenceUnit.createTable(sqlTable); sourceColumns = calculateColumns(_field, _fieldName, mapTable, _sourceType.getTable().getName() + "_", _sourceType, joinColumnsConfig);
393394395396397398399400401402403
sqlTable = joinTableConfig.getName(); joinColumnsConfig = joinTableConfig.getJoinColumnMap(); inverseJoinColumnsConfig = joinTableConfig.getInverseJoinColumnMap(); mapTable = persistenceUnit.createTable(sqlTable); sourceColumns = calculateColumns(_field, _fieldName, mapTable, _sourceType.getTable().getName() + "_", _sourceType,
407408409410411412413414415416417
targetType.getTable().getName() + "_", targetType, inverseJoinColumnsConfig); } else { mapTable = persistenceUnit.createTable(sqlTable); sourceColumns = calculateColumns(mapTable, _sourceType.getTable().getName() + "_", _sourceType);
391392393394395396397398399400401
405406407408409410411412413414415