|Subject||AW: [firebird-support] Foreign Key on update and after update trigger|
is my question too complicated?
Von: firstname.lastname@example.org [mailto:email@example.com]
Gesendet: Freitag, 5. Februar 2016 12:27
Betreff: [firebird-support] Foreign Key on update and after update trigger
we have a table tarbg (primary key teilenr and agnr) and two child tables (twarehouse and twarehouse_sum), both with on update foreign keys to tarbg. In the first child table twarehouse is located an after update trigger which updates the second child table twarehouse_sum with the new value (deletes the old and inserts the new data).
Now we have a problem with duplicated records in twarehouse_sum and we think about, how this could be.
What about the execution order with the foreign key updates and the after update trigger? We saw that the trigger executes only ones which as expected, but what about the execution point? I guess, it is inline after the table is updated but not after the child table is updated. So is the behavior a kind of undefined which table is the first where updated of the both child tables?
Do you know the execution order of the key updates and trigger updates, what rules I have to follow to found behavior on this updates?