[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

View File

@ -259,7 +259,10 @@ public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tabl
|| columnInfo.getTypeCode() == col.getSqlTypeCode( mapping );
if ( !typesMatch ) {
throw new HibernateException(
"Wrong column type: " + col.getName() +
"Wrong column type in " +
Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName()) +
" for column " + col.getName() +
". Found: " + columnInfo.getTypeName().toLowerCase() +
", expected: " + col.getSqlType( dialect, mapping )
);
}