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

Make generated constraint names short and non-random

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.2, 4.3.0.Beta3
    • Component/s: None
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      HHH-1904 - Identifier too long Complete cause non-explicitly named constraints to use randomly generated hex characters. Instead, it would be better to go back to a scheme that uses the table and column names, allowing naming consistency and control over the name length.

      Concat the table and column names, md5 it, then convert the hex to base 35 (full alphanumeric). This guarantees a < 30 character hash.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: