In OutSystems when we reference any other entity's attribute then it automatically sets the Delete rule as 'protect' by default. Instead of the 'Protect' Rule, It should be 'Ignore'.
Why? because.
1. It is always best practice to set the delete rule as 'Ignore' because it will not create any problem if we want to delete some data in a particular table. it doesn't even matter whether the Id is referenced in another table or not.
2. If the default delete rule is Protect, then it is quite hard to run some Delete queries. Our query ain't deleting records because of the default protect rule. and managing this relationship is quite hard.
3. In OutSystems documentation it is clearly mentioned that we should use Ignore rule instead of the 'Protect' rule, then why are you promoting protect by making it default?
4. Let's say Table A and Table B has the Delete rule as 'Delete' and Table B and Table C have the 'Protect' rule. In this case, if I want to delete any record from Table A then it will always create a problem because of the reference in table C and I am not aware of this thing. But in the case of Ignore rule, we could have handled it manually, without any problems.
Thanks,
Ramesh Godara
Outsystems Certified Expert Developer