Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1070

Restore support for composite foreign keys on MySQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.1, 2.0.0-M2
    • 2.0.0-M2
    • jdbc
    • None

    Description

      When creating the database schema for MySQL databases, OpenJPA refuses to define foreign key constraints for composite keys. Warning message is: openjpa.jdbc.Schema - The foreign key "<foreignkey>" was not added to table "[...]" The reason for this is that composite foreign key support is explicitly disabled in MySQLDictionary.

      However, composite foreign keys seem to work flawlessly in recent MySQL versions (such as 5.0.51a). Probably this limitation in MySQLDictionary thus is historic and can be removed.

      For the corresponding mailing list discussion, see here:
      http://n2.nabble.com/Composite-foreign-keys-with-MySQL-tc2772257.html

      Attachments

        Activity

          People

            ppoddar@apache.org Pinaki Poddar
            dirichs Martin Dirichs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: