Improved mesage in Exception from Table.validateColumns
-------------------------------------------------------
Key: HHH-1825
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH=
-1825
Project: Hibernate3
Type: Improvement
Components: metamodel =20
Versions: 3.1.2 =20
Reporter: Bj=C3=B8rn Bjerkeli
Priority: Minor
The method validateColumns in Table throws an exception when it encounters =
a missing column. Each time I encounter this problem, I have to start the d=
ebugger and create a breakpoint to identify the which table that has the mi=
ssing column.
So instead of:
if ( columnInfo =3D=3D null ) {
=09=09=09=09throw new HibernateException( "Missing column: " + col.getName(=
) );
}
Add proper context to the Exception:
if ( columnInfo =3D=3D null ) {
=09=09=09=09throw new HibernateException( "Table:"+this+has " missing colum=
n: " + col.getName() );
}
This will make it trivial to identify and correct the bogus mapping or sche=
ma.
--=20
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators=
.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|