Why is it a with or without join?

Hello,


when creating a join in an aggregate with a 1-to-many relationship and the reference attribute is mandatory, the join will be a only with join and I understand that. 


But when creating a join with a 1-to-1 relationship where the reference attribute, or to make it more clear the entity identifier, has to be mandatory, the join turns out to be a with or without. Why?


Thanks

Hello Lars,

Please take a look to this Diagram. Here Product Identifier is set to ProductPic Id which is Mandatory Obviously.

So as per my understanding whenever you want to add a product pic the ProductId is mandatory which means product should be present. So when you drag a ProductPic Entity directly to the action it will always take Only With Join.

But When you drag Product entity then it will take With Or Without join that is because  a record in the Product Entity  can be created without the Product pic. But the record in the  ProductPic Entity cannot be created  WITHOUT Product Entity. Correct me if I am wrong.

Regards,

Pavan R


mvp_badge
MVP

Hi,

Not sure if I understood the doubt, but in a 1-1 where both Ids are the same, the attribute is in fact mandatory for the record to exist, but you can have a record in one entity but not on the other.

Hope this help to clarify.

Thank you very much for the quick answer. 


But if the attribute is mandatory doesnt that mean that the record has to exist?

mvp_badge
MVP

No, it means that when the record exists the value must be filled.

Hello Lars,

Please take a look to this Diagram. Here Product Identifier is set to ProductPic Id which is Mandatory Obviously.

So as per my understanding whenever you want to add a product pic the ProductId is mandatory which means product should be present. So when you drag a ProductPic Entity directly to the action it will always take Only With Join.

But When you drag Product entity then it will take With Or Without join that is because  a record in the Product Entity  can be created without the Product pic. But the record in the  ProductPic Entity cannot be created  WITHOUT Product Entity. Correct me if I am wrong.

Regards,

Pavan R


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