Unclear line in the Delete rule explanation

Hi,

While reading through the explanations of the Delete rules, I've found the following statement:

"Service Studio allows you to use the Protect delete rule in relationships between entities that are stored in platform database and, therefore, referential integrity can be guaranteed. When creating relationships between your entities and entities references, you must be aware that the Protect rule can only be used when the producer of the entity reference is a module. Otherwise, the delete rule must be Ignore.

(https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Delete_Rules)

Could someone help me understand what is meant by: "...you must be aware that the Protect rule can only be used when the producer of the entity reference is a module."?

Thanks in advance!

Levi


Hi Levi,


The "Protect" rule only works if that table (Entity) belongs to the same DB catalog than the Table that you are reference the foreign key.


Hope this can help you.


Best regards,

Ricardo

Solution

Hello Levi,

You can import entities from external databases using an Extension.
In that case, if you have foreign keys to those external entities, the platform can't execute the DELETE rules (Protect or Delete) between them, and so, you must set it to "ignore".

Hope this helps.

Cheers.

Solution