Improved mesage in Exception from Table.validateColumns

Description

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 debugger and create a breakpoint to identify the which table that has the missing column.

So instead of:

if ( columnInfo == null ) {
throw new HibernateException( "Missing column: " + col.getName() );
}

Add proper context to the Exception:

if ( columnInfo == null ) {
throw new HibernateException( "Table:"+this+has " missing column: " + col.getName() );
}

This will make it trivial to identify and correct the bogus mapping or schema.

Activity

Steve EbersoleMarch 21, 2011 at 7:04 PM

Bulk closing stale resolved issues

Diego PlentzAugust 15, 2007 at 4:01 PM

Already done.

if ( columnInfo == null ) {
throw new HibernateException( "Missing column: " + col.getName() + " in " + Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName()));
}

Max Rydahl AndersenJune 9, 2006 at 9:10 AM

add a patch and it will be done faster

Cannot Reproduce

Details

Assignee

Reporter

Components

Priority

Created June 9, 2006 at 8:54 AM
Updated March 21, 2011 at 7:04 PM
Resolved August 15, 2007 at 4:01 PM

Flag notifications