JOINS CREATED IN AN AUTOMATED QUERY

Can someone help me understand the logic behind the automaticaIIy created joins in automated query.

that is,the Iogic behind system creating "With" ,"With or Without" etc joins when we drag teh entities.

Hi Remya,

in a 1 to many relationship where the foreign key attribute with mandatory property set to false, the join wil be With or without.

If the foreign key attribute is mandatory then the join will by Only with.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Remya,

in a 1 to many relationship where the foreign key attribute with mandatory property set to false, the join wil be With or without.

If the foreign key attribute is mandatory then the join will by Only with.

Regards,

Daniel

Hi DanieI,

My post was based on beIow question

As foriegn atrributes are created with defauIt mandatory vaIe as No.I suppose the answer needs to With or Without.Am I correct?

Hello Remya.

That's precisely that.

If the attribute is not mandatory, it is possible the entity is not matching so "With or Without". If the attribute is mandatory, it is "Only With" because they match for sure.

Nuno Reis wrote:

Hello Remya.

That's precisely that.

If the attribute is not mandatory, it is possible the entity is not matching so "With or Without". If the attribute is mandatory, it is "Only With" because they match for sure.

So you meant to say this is wrong.

and the actuaI answer is Option A: With or Without

Yes,  if it is Mandatory=No it should be the first option.

Solution

this is easy to validate in OutSystems, and I did.

  1. Create new entity
  2. Add UserId as foreign key attribute, the mandatory option is defaulted to No
  3. Drag the new entity to a server action to auto create the aggregate
  4. Open the aggregate and drag the User entity to it
  5. The join condition is set to "With or without".

Regards,

Daniel

Solution