Hello,

Can you explain to me how the Joins in an Agreggate are defined, when we create data models automatically?

I already understood that Join Only With is created if the xxxld attribute in the Entity is mandatory.


But what about With or without and With?

Thank You

Karina Ferreira wrote:

Hello,

Can you explain to me how the Joins in an Agreggate are defined, when we create data models automatically?

I already understood that Join Only With is created if the xxxld attribute in the Entity is mandatory.


But what about With or without and With?

Thank You

Hi you can learn here https://www.outsystems.com/learn/lesson/1770/modeling-data-relationships

Hello Karina.

Translation to standard SQL:

Only With is Inner Join.

With or Without is Left Join (so choose wisely the entity on each side)

With is Full Join

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Queries/Supported_Join_Types

Automated is just Only With (if foreign key is a mandatory attribute) and With or Without (if is not mandatory) because they are the obvious choices:

if it is mandatory, I can do a Inner Join because they will match. If it is not mandatory, I keep the relevant table and all the extra info is a bonus.

Nuno Reis wrote:

Hello Karina.

Translation to standard SQL:

Only With is Inner Join.

With or Without is Left Join (so choose wisely the entity on each side)

With is Full Join

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Queries/Supported_Join_Types

Automated is just Only With (if foreign key is a mandatory attribute) and With or Without (if is not mandatory) because they are the obvious choices:

if it is mandatory, I can do a Inner Join because they will match. If it is not mandatory, I keep the relvant table and all the extra info is a bonus.

Hllo Nuno,

That part, I understood.
My question is, when we drag an attribute to create Join and the Id attribute is mandatory, Join will be created automatically as Only With.
If it is not mandatory, it is created as with or without, correct?
And following this logic, when Join With is automatically assigned?


Yes on the Only With.

Yes on the With or Without.

if you drop non-related entities, they aren't joined because there is no relationship.


I never saw With automatically assigned. But I also never used Full Join...
I assume it is a manual process because that is truly an exception to daily development scenarios.

Karina Ferreira wrote:

Hello,

Can you explain to me how the Joins in an Agreggate are defined, when we create data models automatically?

I already understood that Join Only With is created if the xxxld attribute in the Entity is mandatory.


But what about With or without and With?

Thank You


Hi,


In simple word or in SQL terminology

With : Full join ( will return all records from both tables)

With or Without : Left outer join ( will return all records from left table whether its match or not in right table)