Many to many

Hello,
    I am new to OutSystems. Anyone please provide me a perfect, basic and easy to understand example on many to many relationships.

Thanks in advance

mvp_badge
MVP
Solution

Hi,

You can in OutSystems not directly create a many-to-many relationship between entities.

Instead, you need a third entity with two foreign keys to each of the primary key of the two entities which have a logical many-to-many relationship.

In addition, you can set an index, and decide if the combination of the 2 foreign keys should be unique or not.

For more information, see:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Create_a_Many-to-Many_Relationship

Regards,

Daniel

Thanks 

Hy @Shubham Singh Chauhan 

In Outsystem we have to create a junction entity so that we can hold the identifiers of tables.

First, we need to create the entities ( Tables) . after that create one more entity ( junction entity ) and create its attribute ( Right click add attribute ), and in the data type dropdown select the entity identifier you want to hold a reference.

follow these steps to add more attributes to your junction table.

Thanks.

Regards,

@Gourav Shrivastava 

Thanks @Gourav Shrivastava I got the answer.

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