mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 11:48:18 +00:00
HHH-14519 improve error message
fix by @karge-itestra Tassilo Karge
This commit is contained in:
parent
ceb7e565fe
commit
16141487d5
@ -1216,7 +1216,16 @@ public void addColumnNameBinding(Table table, Identifier logicalName, Column col
|
||||
|
||||
@Override
|
||||
public String getPhysicalColumnName(Table table, String logicalName) throws MappingException {
|
||||
return getPhysicalColumnName( table, getDatabase().toIdentifier( logicalName ) );
|
||||
final Identifier identifier = getDatabase().toIdentifier( logicalName );
|
||||
if ( identifier == null ) {
|
||||
throw new MappingException( String.format(
|
||||
Locale.ENGLISH,
|
||||
"Column with logical name '%s' in table '%s' cannot be mapped to column identifier",
|
||||
logicalName,
|
||||
table.getName()
|
||||
) );
|
||||
}
|
||||
return getPhysicalColumnName( table, identifier );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user