How to get type of foreign attribute in Entity_Attr?

How to get type of foreign attribute in Entity_Attr?

  

Hello OutSystems,

I'm trying to generate a dynamic SQL to create a common table with the structure same as an exist entity in my project. I'm using Entity_Attr dependencies to get all attribute in my entity. With normal attribute, the Type column will return a text type of that attribute, ex: rtInterger,... But with foreign attribute, the Type column will return key like: "bt478870b9-2d60-4f73-9eb3-7cd8b994a737*f8f52822-47d5-b232-0777-79d47c6f5ffb"

Is there anyway that I can get the Type of this foreign attribute?


Hi, I think 

1. You can use another system entity to find the foreign key table

2. then use your attr table to find the foreign key's column data type

May be you need to explore this:

https://www.outsystems.com/forums/discussion/14620/how-to-map-servicestudio-entities-to-actual-table-names/

regards


RI wrote:

Hi, I think 

1. You can use another system entity to find the foreign key table

2. then use your attr table to find the foreign key's column data type

May be you need to explore this:

https://www.outsystems.com/forums/discussion/14620/how-to-map-servicestudio-entities-to-actual-table-names/

regards


Thanks for your reply, I have followed your topic but I coudln't find the foreign key table in Espace entity.


Solution

Hi,

In the System Entity "Entity" there are two columns: 

and in the System Entity "Entity_attr":

From the definition, foreign key is a key from other table. Using these two entities then you can get the type of foreign key.

regards

Solution