Error: Primary key for row in table 'x' is referenced by foreign key 'f' in table 'y' - and 'f' is cascaded for update ?

(ASA 9 newest ebf)

I'm getting this error even though mentioned foreign key has cascade updates
(and deletes too) enabled.
Is this some new behaviour in asa 9, or why can i get such message for
cascaded foreign key? Any ideas?
Thanks

Pete


0
Peter
1/22/2004 1:06:55 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

4 Replies
1075 Views

Similar Articles

[PageSpeed] 1

Found a reason for it...but should it really work so? It's this way:

- table a has columns a,b,c
- table b has columns a,c, and references columns a,c (with a,c) in table a
with cascade updates
- table a hes before update trigger to change columns a when column b is
changed (set new_row.a = ...)

and that set new_row.a = ... in before update trigger does NOT fire cascade
update for b(a,c)->a(a.c) refrence!
isnt this a bug?

Pete


0
Peter
1/22/2004 2:05:29 PM
Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?

On 22 Jan 2004 06:05:29 -0800, "Peter Beno" <pete_beno@hotmail.com>
wrote:

>Found a reason for it...but should it really work so? It's this way:
>
>- table a has columns a,b,c
>- table b has columns a,c, and references columns a,c (with a,c) in table a
>with cascade updates
>- table a hes before update trigger to change columns a when column b is
>changed (set new_row.a = ...)
>
>and that set new_row.a = ... in before update trigger does NOT fire cascade
>update for b(a,c)->a(a.c) refrence!
>isnt this a bug?
>
>Pete
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
1/22/2004 2:25:01 PM
> Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?

No nobody changed it, it is still After, i just checked.


0
Peter
1/23/2004 8:44:46 AM
Yes, it looks like ON UPDATE CASCADE processing is only executed if
the primary key is explicitly mentioned in the SET clause.

I am posting a description in a new thread, to get folks attention :)

Breck

On 23 Jan 2004 00:44:46 -0800, "Peter Beno" <pete_beno@hotmail.com>
wrote:

>> Has the RI_TRIGGER_TIME option been changed to 'BEFORE'?
>
>No nobody changed it, it is still After, i just checked.
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
1/23/2004 1:01:43 PM
Reply: