Derby
  1. Derby
  2. DERBY-735

Need implementation for `ON UPDATE CASCADE`

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1.2.1
    • Fix Version/s: None
    • Component/s: SQL
    • Environment:
      Gentoo Linux, JDK 1.5.0_04
    • Urgency:
      Low

      Description

      Ifound no chance to implement such statement in derby

      CREATE TABLE A (
      ax INTEGER NOT NULL,

      PRIMARY KEY(ax)
      );

      CREATE TABLE B (

      bx INTEGER NOT NULL,

      FOREIGN KEY (bx) REFERENCES A (ax)
      ON UPDATE CASCADE – can't make this work
      ON DELETE CASCADE
      );

      Seems `ON UPDATE CASCADE` does not implemented in derby yet.

      P.S. I found this working in HSQL, M$SQL, PostgreSQL... but not in
      debry

        Activity

        Igor Galchevsky created issue -
        Dag H. Wanvik made changes -
        Field Original Value New Value
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        Hide
        Gabriele Kahlout added a comment - - edited

        Supported by SQLite and MySQL.

        Show
        Gabriele Kahlout added a comment - - edited Supported by SQLite and MySQL.
        Hide
        Sylvain Leroux added a comment -

        It does seem to be a desirable feature.

        I don't have any idea how much work it is - nor where to start from.
        But with some help I could work on it.

        • Sylvain
        Show
        Sylvain Leroux added a comment - It does seem to be a desirable feature. I don't have any idea how much work it is - nor where to start from. But with some help I could work on it. Sylvain
        Sylvain Leroux made changes -
        Assignee Sylvain Leroux [ sleroux ]
        Hide
        Kristian Waagan added a comment -

        Unassigning due to inactivity.

        Sylvain, if you still want to work on this feel free to reassign it you yourself.

        Show
        Kristian Waagan added a comment - Unassigning due to inactivity. Sylvain, if you still want to work on this feel free to reassign it you yourself.
        Kristian Waagan made changes -
        Assignee Sylvain Leroux [ sleroux ]
        Mamta A. Satoor made changes -
        Labels derby_triage10_11
        Urgency Low [ 10053 ]
        Gavin made changes -
        Workflow jira [ 12344303 ] Default workflow, editable Closed status [ 12801860 ]
        Hide
        Dag H. Wanvik added a comment -

        I have been working with the deferred constraints and cascading delete fall-out (DERBY-6576) for a bit now, and it looks as if it shouldn't be too hard to add CASCADE/SET NULL for UPDATE as well. Since one update's potential cascade might be offset by another update, we'd need to temporarily store all deletes before the inserts, and finally
        check which rows are orphaned against the net change in the primary table, so we can see which dependent rows need the cascade action.

        Show
        Dag H. Wanvik added a comment - I have been working with the deferred constraints and cascading delete fall-out ( DERBY-6576 ) for a bit now, and it looks as if it shouldn't be too hard to add CASCADE/SET NULL for UPDATE as well. Since one update's potential cascade might be offset by another update, we'd need to temporarily store all deletes before the inserts, and finally check which rows are orphaned against the net change in the primary table, so we can see which dependent rows need the cascade action.

          People

          • Assignee:
            Unassigned
            Reporter:
            Igor Galchevsky
          • Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:

              Development