private TableJoin generateFtJoin( MappingContext from, FeatureType valueFt ) { if ( valueFt != null && valueFt.getSchema().getSubtypes( valueFt ).length == 1 ) { LOG.warn( "Ambigous feature join." ); } TableName fromTable = new TableName( from.getTable() ); TableName toTable = new TableName( "?" ); List<String> fromColumns = Collections.singletonList( from.getColumn() ); List<String> toColumns = Collections.singletonList( detectPrimaryKeyColumnName() ); Map<SQLIdentifier, IDGenerator> keyColumnToIdGenerator = new HashMap<SQLIdentifier, IDGenerator>(); keyColumnToIdGenerator.put( new SQLIdentifier( "id" ), new AutoIDGenerator() ); return new TableJoin( fromTable, toTable, fromColumns, toColumns, Collections.EMPTY_LIST, false, keyColumnToIdGenerator ); }
if ( valueFt != null && valueFt.getSchema().getSubtypes( valueFt ).length == 1 ) {