OpenJPA
  1. OpenJPA
  2. OPENJPA-1070

Restore support for composite foreign keys on MySQL

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.0.0-M2
    • Fix Version/s: 2.0.0-M2
    • Component/s: jdbc
    • Labels:
      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

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Pinaki Poddar
            Reporter:
            Martin Dirichs
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development