HHH-10191 Fixed exceptions when a functional index exists.

This commit is contained in:
Yoann Rodière 2015-12-21 16:24:03 +01:00 committed by Gail Badner
parent be94481e33
commit 0dea233ce3
2 changed files with 8 additions and 2 deletions

View File

@ -1725,4 +1725,8 @@ public interface CoreMessageLogger extends BasicLogger {
id = 474
)
String ambiguousPropertyMethods(String entityName, String oneMethodSig, String secondMethodSig);
@LogMessage(level = INFO)
@Message(value = "Cannot locate column information using identifier [%s]; ignoring index [%s]", id = 475 )
void logCannotLocateIndexColumnInformation(String columnIdentifierText, String indexIdentifierText);
}

View File

@ -592,8 +592,10 @@ public class InformationExtractorJdbcDatabaseMetaDataImpl implements Information
final Identifier columnIdentifier = identifierHelper().toIdentifier( resultSet.getString( "COLUMN_NAME" ) );
final ColumnInformation columnInformation = tableInformation.getColumn( columnIdentifier );
if ( columnInformation == null ) {
throw new SchemaManagementException(
"Could not locate column information using identifier [" + columnIdentifier.getText() + "]"
// See HHH-10191: this may happen when dealing with Oracle/PostgreSQL function indexes
log.logCannotLocateIndexColumnInformation(
columnIdentifier.getText(),
indexIdentifier.getText()
);
}
builder.addColumn( columnInformation );