[HHH-2852] Better error messages when schema validation fails

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14035 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Diego Plentz 2007-09-29 17:20:17 +00:00
parent e5e59ed2f2
commit 33ad68f239
1 changed files with 5 additions and 2 deletions

View File

@ -259,8 +259,11 @@ public class Table implements RelationalModel, Serializable {
|| columnInfo.getTypeCode() == col.getSqlTypeCode( mapping ); || columnInfo.getTypeCode() == col.getSqlTypeCode( mapping );
if ( !typesMatch ) { if ( !typesMatch ) {
throw new HibernateException( throw new HibernateException(
"Wrong column type: " + col.getName() + "Wrong column type in " +
", expected: " + col.getSqlType( dialect, mapping ) Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName()) +
" for column " + col.getName() +
". Found: " + columnInfo.getTypeName().toLowerCase() +
", expected: " + col.getSqlType( dialect, mapping )
); );
} }
} }