Subject | Re: [firebird-support] Re: on delete cascade |
---|---|
Author | Ann W. Harrison |
Post date | 2006-06-05T21:24:11Z |
lobolo2000 wrote:
the remnants of "row by row" behavior in favor of "verb by verb"
constraint checking. Part of that will (eventually) include
moving pre-operation triggers on multi-table update verbs - like
cascading updates and deletes - so all pre-operation triggers
fire before any operation and all post-operation triggers fire
after all operations. We're not their yet.
cascading operations because the pre-operation trigger will
fire before any changes are made, causing the operation to
fail - hung by its own suspenders, to stretch a metaphor.
Regards,
Ann
>Probably not. As I suggested earlier, we are working to clean up
> But the question is: should we be able to execute statements while the
> detail records have no master record, or in more general terms when
> referential integrity is violated though temporarily?
the remnants of "row by row" behavior in favor of "verb by verb"
constraint checking. Part of that will (eventually) include
moving pre-operation triggers on multi-table update verbs - like
cascading updates and deletes - so all pre-operation triggers
fire before any operation and all post-operation triggers fire
after all operations. We're not their yet.
>That's a belt and suspenders approach that won't work with
> Example: Consider having a flag field in the master record that
> allows/prevents deletion of detail records. In the before delete
> trigger of the detail table, the master record's flag is checked to
> decide whether to allow the deletion or throw an exception.
cascading operations because the pre-operation trigger will
fire before any changes are made, causing the operation to
fail - hung by its own suspenders, to stretch a metaphor.
Regards,
Ann