Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0-M3
    • Fix Version/s: 3.0-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:

      AndromMDA RC1 latest build

      Description

      We're using Hibernate's SchemaExport tool to generate the database schema SQL script.

      By default, this tool names foreign key constraints as follows:
      FK + hash(table name) + hash(column name)

      This guarantees the foreign key constraint name uniqueness, but really isn't meaningful when used in foreign key constraint violation error messages (e.g.: FK78191C2991B).

      It isn't possible to use a custom NamingStrategy, like for table and column names,
      but it is still possible to override the default name by adding a 'foreign-key' attribute on the following elements of the Hibernate mapping file (See Hibernate Reference chapter 15): <one-to-one>, <many-to-one>, <key>, and <many-to-many>.

      I think AndroMDA could make a good use of association-end names to generate meaningful unique names for foreign key constraints or use a naming pattern like: fk + table name + column name.

        Attachments

          Activity

            People

            • Assignee:
              overheat overheat
              Reporter:
              johnny.macchione@sylis.be Johnny Macchione
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: