How are Foreign Keys Handled in OutSystems Metadata?

When one entity has a relationship with another, their supporting physical tables will have Foreign Key constraints applied.

However, OutSystems will also keep track of this relation on their metadata information. If you look into the contents of the ossys_entity_attr, the column ‘TYPE’ will hold the internal datatype of that attribute.

When the attribute is an FK to another table, instead of a more readable value it will have something that follows the pattern: “bt*".

Extracting the values and will give you respectively the SS_KEY value of the corresponding Espace and the SS_KEY value of the corresponding Entity; thus allowing one to seamlessly navigate to the target entity of the relation.



5 Ways Infosistema DMM can Pacify Your Company’s DPO