while ( referencingValueIterator.hasNext() ) {
if ( ! targetValueIterator.hasNext() ) {
// TODO: improve this message
throw new MappingException( "number of values in many-to-one reference is greater than number of values in target" );
}
SimpleValue referencingValue = referencingValueIterator.next();
SimpleValue targetValue = targetValueIterator.next();
if ( Column.class.isInstance( referencingValue ) ) {
if ( ! Column.class.isInstance( targetValue ) ) {
// TODO improve this message
throw new MappingException( "referencing value is a column, but target is not a column" );
}