I’m using MSSQL 2005 and Toad Data Modeler 2.25.
I want to genereate cascade delete triggers, but the deafault behaviour is to create AFTER DELETE triggers which is not useful since foreign key constrains kicks in before this time.
I modified CreateTriggerDelete to create a INSTEAD OF DELETE trigger which works OK, but I need to delete from current table in addition to the child tables as well:
delete %tablename% from %tablename% t, deleted d
where t.key = d.key
How to I generate the key part? I tried using @ForRelPk() but it keeps crashing…