You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2014/05/26 18:36:01 UTC

[jira] [Commented] (DERBY-735) Need implementation for `ON UPDATE CASCADE`

    [ https://issues.apache.org/jira/browse/DERBY-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008946#comment-14008946 ] 

Dag H. Wanvik commented on DERBY-735:
-------------------------------------

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.

> Need implementation for `ON UPDATE CASCADE`
> -------------------------------------------
>
>                 Key: DERBY-735
>                 URL: https://issues.apache.org/jira/browse/DERBY-735
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.1.2.1
>         Environment: Gentoo Linux, JDK 1.5.0_04
>            Reporter: Igor Galchevsky
>              Labels: derby_triage10_11
>
> 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 :(



--
This message was sent by Atlassian JIRA
(v6.2#6252)