Uploaded image for project: 'Hibernate ORM'
  1. HHH-10802

Attempt to resolve foreign key metadata from JDBC metadata failed to find column mappings for foreign key

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects versions: 5.2.0
    • Fix versions: 5.2.1, 5.1.1
    • Components: hibernate-core
    • Labels:
      None
    • Environment:
      JDK 1.8
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      When a foreign key references a key from another schema, pkTableInformation is always null in InformationExtractorJdbcDatabaseMetaDataImpl#getForeignKeys.

      The cause is

      final QualifiedTableName incomingPkTableName = extractKeyTableName( resultSet, "PK" );

      returning a DatabaseIdentifier object, but

      identifierHelper().toIdentifier( resultSet.getString( "TABLE_NAME" ) ) )

      return an Identifier object, then comparation failed in InformationExtractorJdbcDatabaseMetaDataImpl#processGetTableResults

      if ( tableName.equals( identifierHelper().toIdentifier( resultSet.getString( "TABLE_NAME" ) ) ) ) {

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: