Hi,

I have one issue in my program discribe bellow:

1) I have created an Entity;

2) This entity has data of other different entities:

     Attributes:

    Id    EntityId    RowEntityId

    In other words, I have one entity with one attribute of entity id and the row id of this same entity;

3) How can I get the EntityId or something that represent the entity?

Hi Felipe,

For what i can understand, you have one Entity that contains 2 forein keys one for other entity and other for the row.

To retrieve info Entity you have to build a agregate that joins  Entity with the other entity and/or Row to get the info from the other entity and the rows

BR

Hello Felipe,

Sorry, but could you try to be more specific?
What exactly are you trying to do?

Because when you tell that you created an "Entity" and that its attributes are "EntityId" and "RowEntityId", I am thinking that the attribute EntityId is an FK for the Entity itself (it points to another row in the same entity, while the "RowEntityId" is an FK that points to a different entity called RowEntity.

So, maybe you could provide more "meaningful" names for your example? And also what are you trying to achieve?

Cheers.

Domingues wrote:

Hi Felipe,

For what i can understand, you have one Entity that contains 2 forein keys one for other entity and other for the row.

To retrieve info Entity you have to build a agregate that joins  Entity with the other entity and/or Row to get the info from the other entity and the rows

BR

Hi Domingues,

Thank you for proporse, I will try the idea in my project. I also attached a drawing to better understant of what I need.


Eduardo Jauch wrote:

Hello Felipe,

Sorry, but could you try to be more specific?
What exactly are you trying to do?

Because when you tell that you created an "Entity" and that its attributes are "EntityId" and "RowEntityId", I am thinking that the attribute EntityId is an FK for the Entity itself (it points to another row in the same entity, while the "RowEntityId" is an FK that points to a different entity called RowEntity.

So, maybe you could provide more "meaningful" names for your example? And also what are you trying to achieve?

Cheers.

Hi Eduardo,

Follow the drawing of the doubt:


By this diagram what I got is that entity_5 hold different types of data. What is the data type of the attribute holds foreign keys of other tables in entity_5?

Hi Felipe, 

Much clearer now. Unfortunately, in OutSystems, there is no such a thing as an attribute that can be used as an "entity identification" in the sense it would allows you to store a code to identify a table. 

An attribute of type Entity Identifier will always hold identifiers for a unique entity. 

What exactly are you trying to achieve? This data model design seems very bad, and hard to work with. 

Maybe with more context we can provide you with a better anternative. 

Cheers 

Eduardo Jauch wrote:

Hi Felipe, 

Much clearer now. Unfortunately, in OutSystems, there is no such a thing as an attribute that can be used as an "entity identification" in the sense it would allows you to store a code to identify a table. 

An attribute of type Entity Identifier will always hold identifiers for a unique entity. 

What exactly are you trying to achieve? This data model design seems very bad, and hard to work with. 

Maybe with more context we can provide you with a better anternative. 

Cheers 

It is little hard to explain the complete idea, but I was trying to put some description, text type, of any table that I want in a table record widget.

I found other idea to solv it. And it is good to know that try to use a type of Entity ID isn´t the better way.

Thank you for help me!