Subject Re: [firebird-support] Re: On delete cascade and before delete triggers
Author Calin Iancu Pirtea
----- Original Message -----
From: "Alexander V.Nevsky"

> Calin, no, it is right behaviour. It prevents the next situation,
> which will occure if check of details existance will be performed
> before master delete:
> 1. Transaction 1 started delete process
> 2. Transaction 1 checked existance of details and delete them
> 3. Transaction 2 inserted new detail for this master record
> 4. Transaction 1 deleted master and commited
> moment of transaction 2 commit is not principial, we have broken
> references integrity. Current behaviour (master deleted first)
> guarantees that transaction 2 can't insert detail during cascade
> delete process.

You're right.
I did not think of it.


Best regards,
Application Developer
Calin Iancu, Pirtea
S.C. SoftScape S.R.L.