OpenJPA
  1. OpenJPA
  2. OPENJPA-642

Sybase create foreign key on delete set null failed with syntax error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      The following alter table statement is rejected:

      ALTER TABLE dbo.JPADeptBean
      ADD CONSTRAINT FK_EmpBean_mgr FOREIGN KEY (MGR_EMPID) REFERENCES dbo.JPAEmpBean (empid) ON DELETE SET NULL

      with com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near the keyword 'ON'.

      According to Sybase IQ 12.7, Sybase only supports foreign key on delete/update restrict.

      http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc38151_1270/html/iqref/BABCGFHG.htm

        Activity

        Hide
        Michael Dick added a comment -

        Committed fix under revision 671585

        Show
        Michael Dick added a comment - Committed fix under revision 671585
        Hide
        Michael Dick added a comment -

        Thanks for the patch Fay!

        Show
        Michael Dick added a comment - Thanks for the patch Fay!

          People

          • Assignee:
            Michael Dick
            Reporter:
            Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development