while ( columnIterator.hasNext() ) {
Column fkcolumn = (Column) columnIterator.next();
if(fkcolumn.getSqlTypeCode()!=null) { // TODO: user defined foreign ref columns does not have a type set.
guessAndAlignType(collectionTable, fkcolumn, mapping, false); // needed to ensure foreign key columns has same type as the "property" column.
}
keyValue.addColumn( fkcolumn );
}
collection.setKey(keyValue);
mappings.addCollection(collection);