DdlUtils
  1. DdlUtils
  2. DDLUTILS-195

Can not update a foreign key on a case sensetive MySql Database

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Component/s: Core - MySql
    • Labels:
      None
    • Environment:
      Trying to update a existing case sensitive mysql database on Linux

      Description

      For testing purposes I made my MySql database case sensitive (to avoid problems when deploying to linux)

      The foreign key restrained throws the following exception;
      throw new ModelException("The foreignkey "fkDesc" in table "curTable.getName()" references the undefined table "+fk.getForeignTableName());

      fk.getForeignTableName is all lower case, while the table name is camel case. hacking the correct camel case into the piece of code that throws the exception 'fixes' the issue. Therefore the issue is that fk.getForeignTableName()) contains the wrong table name.

      This wrong table name comes from JdbcModelReader
      fk.setForeignTableName((String)values.get("PKTABLE_NAME"));

      The PKTABLE_NAME value comes from readColumn what returns the table name in lowercase

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Thomas Dudziak
            Reporter:
            meindert hoving
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development