Author: d.plentz
Date: 2007-09-29 13:18:42 -0400 (Sat, 29 Sep 2007)
New Revision: 14034
Modified:
core/branches/Branch_3_2/src/org/hibernate/mapping/Table.java
Log:
[HHH-2852] Better error messages when schema validation fails
Modified: core/branches/Branch_3_2/src/org/hibernate/mapping/Table.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/mapping/Table.java 2007-09-29 15:07:11 UTC
(rev 14033)
+++ core/branches/Branch_3_2/src/org/hibernate/mapping/Table.java 2007-09-29 17:18:42 UTC
(rev 14034)
@@ -259,8 +259,11 @@
|| columnInfo.getTypeCode() == col.getSqlTypeCode( mapping );
if ( !typesMatch ) {
throw new HibernateException(
- "Wrong column type: " + col.getName() +
- ", expected: " + col.getSqlType( dialect, mapping )
+ "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 )
);
}
}