Open johngordon75 opened 2 years ago
No, this is correct and intended behavior. This is the only way to prevent insertion of new detail records during deletion of the master.
insertion of new detail records during deletion of the master.
But this is the logical error of database developer. What is the purpose of such actions?
SERVER version WI-V6.3.5.33330 Firebird 3.0
Create 2 tables with relations. Here the create script
now delete record
delete from TABLE2 where id=3
works fine
and now delete record with cascade delete
delete from TABLE1 where id=1
and got the error (we have no master record???)
So, we can see next (wrong?) behavior
Looks like the BUG?
Old version of Interbase and Firebird work with right steps:
and database restored from backup of old Interbase/firebird has right behavior. Only new created database (and new tables in old database) has such new behavior.
I can restore normal behavior when manually delete records from TABLE2 in the TABLE1 BEFORE DELETE trigger. But so there is no point use CASCADE delete in such case.