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

        Martin Dirichs created issue -
        Pinaki Poddar made changes -
        Field Original Value New Value
        Assignee Pinaki Poddar [ ppoddar@apache.org ]
        Pinaki Poddar made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-M2 [ 12313483 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 6h 36m 1 Pinaki Poddar 09/May/09 18:05
        Resolved Resolved Closed Closed
        304d 1h 25m 1 Donald Woods 09/Mar/10 18:31

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development