You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Vasja Pupkin <tr...@gonivo.org.ua> on 2005/11/24 13:42:31 UTC
ON UPDATE CASCADE in derby
Is there any 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
);
P.S. I found this working in HSQL, M$SQL, PostgreSQL... but not in
debry :(
Re: ON UPDATE CASCADE in derby
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Vasja Pupkin wrote:
> Is there any 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
> );
>
>
> P.S. I found this working in HSQL, M$SQL, PostgreSQL... but not in
> debry :(
>
I checked the "Referential actions" section of
http://db.apache.org/derby/docs/10.1/ref/rrefsqlj13590.html . Choices
for the ON UPDATE rule include NO ACTION and RESTRICT -- CASCADE isn't
supported for update; it looks like it is only supported for delete. I
checked Jira and didn't find that anyone has requested this yet, so feel
free to log an enhancement request for ON UPDATE CASCADE support. Jira
tips are at http://db.apache.org/derby/DerbyBugGuidelines.html .
regards,
-jean
RE: ON UPDATE CASCADE in derby
Posted by Andrej Tibaut <an...@uni-mb.si>.
That was also my original question months ago. We made a way around this
programatically. Obviously, nothing changed until today.
Regards,
Andrej
�-----Original Message-----
�From: Vasja Pupkin [mailto:trash@gonivo.org.ua]
�Sent: 24. november 2005 13:43
�To: derby-user@db.apache.org
�Subject: ON UPDATE CASCADE in derby
�
�Is there any 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
�);
�
�
�P.S. I found this working in HSQL, M$SQL, PostgreSQL... but
�not in debry :(
�
�