Subject | Trigger order |
---|---|
Author | lseckde |
Post date | 2010-01-13T17:36:37Z |
Hi,
I have an question about triggers, where triggers doesn't behave like i excepted.
I have an AFTER DELETE POSITION 10 trigger
in this trigger I would like to do an action, if an record has been deleted.
This works fine, until the record could not be deletet because of an foreign key constraint. In this case the trigger is called, also the delete will not be carried out.
I would have expected that the check constraints (which are as far as I know also implemented as Triggers) will be called before the delete?
I would except the following order:
any user "before delete" trigger
system check triggers
any user "after delete" trigger
Is there an way to get the above behavior? (Trigger at a point of no returne)
(I'm using firebird (2.1.3.18185))
Any hints or ideas are welcome
Regards
Thomas
I have an question about triggers, where triggers doesn't behave like i excepted.
I have an AFTER DELETE POSITION 10 trigger
in this trigger I would like to do an action, if an record has been deleted.
This works fine, until the record could not be deletet because of an foreign key constraint. In this case the trigger is called, also the delete will not be carried out.
I would have expected that the check constraints (which are as far as I know also implemented as Triggers) will be called before the delete?
I would except the following order:
any user "before delete" trigger
system check triggers
any user "after delete" trigger
Is there an way to get the above behavior? (Trigger at a point of no returne)
(I'm using firebird (2.1.3.18185))
Any hints or ideas are welcome
Regards
Thomas