Subject | Re: [ib-support] Re: preventing orphaned rows |
---|---|
Author | Duilio Foschi |
Post date | 2002-02-17T02:58:31Z |
David,
using.
The problem with these controls is that you lose the atomic nature of the
master-detail record: the header and every single row start lives of their
own <g>
to be deleted first.
If I apply the control you suggest, it seems that nobody will be able to
delete a whole (master-detail) record any more...
Ciao
Duilio
>Have you thought of inserting a detail row from within an AFTER INSERTcool, but both solutions look difficult to implement with IBO, that I am
>trigger on the master table?
>Alternatively, insert both the master row
>and the first detail row using a stored procedure that first does the
>master, then the detail.
using.
The problem with these controls is that you lose the atomic nature of the
master-detail record: the header and every single row start lives of their
own <g>
>Similarly, you could use a BEFORE DELETE trigger on the detail tablethere is already a foreign key in the detail table that prevents the master
>to make sure at least one detail row remains for the master row.
to be deleted first.
If I apply the control you suggest, it seems that nobody will be able to
delete a whole (master-detail) record any more...
>Come va il progetto?spero di consegnare gran parte della nuova versione gia' lunedi'.
Ciao
Duilio