3826
Views
5
Comments
Joins Agreggates
Question

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

2025-12-23 12-24-14
Adão Pedro

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

2016-04-22 00-29-45
Nuno Reis
 
MVP

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.

2020-04-03 14-17-26
Karina Ferreira

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?


2016-04-22 00-29-45
Nuno Reis
 
MVP

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.

2024-06-19 07-19-32
JitendraYadav

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)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.