The following code block of TableBinder:java:584 is simply dangerous, since the iterator mappedByColumns returns org.hibernate.mapping.Selectable instances, which are either implemented by org.hibernate.mapping.Column or org.hibernate.mapping.Formula. Therefore, a cast to Column without any check is a bad idea. I guess Formula need some special treatment or at least a decend error message.
while ( mappedByColumns.hasNext() ) {
Column column = (Column) mappedByColumns.next();
columns[0].overrideFromReferencedColumnIfNecessary( column );
columns[0].linkValueUsingAColumnCopy( column, value );
}
|